Testkube API (1.0.0)
Download OpenAPI specification:Download
Testkube provides a Kubernetes-native framework for test definition, execution and results
Test triggers keymap
Returns a keymap (supported/allowed fields) for the test trigger UI screen
Responses
Response samples
- 200
{- "resources": [
- "pod",
- "deployment",
- "statefulset",
- "daemonset",
- "service",
- "ingress",
- "event",
- "configmap"
], - "actions": [
- "run"
], - "executions": [
- "test",
- "testsuite"
], - "events": {
- "pod": [
- "created",
- "modified",
- "deleted"
], - "deployment": [
- "created",
- "modified",
- "deleted"
]
}, - "conditions": [
- "Available",
- "Progressing"
], - "concurrencyPolicies": [
- "allow",
- "forbid",
- "replace"
]
}List test triggers
List test triggers from the kubernetes cluster
query Parameters
| namespace | string Default: "testkube" Namespace of the object |
| selector | string Labels to filter by |
Responses
Response samples
- 200
- 400
- 502
[- {
- "name": "test1",
- "namespace": "testkube",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "resource": "pod",
- "resourceSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "event": "modified",
- "conditionSpec": {
- "conditions": [
- {
- "status": "True",
- "type": "Progressing",
- "reason": "NewReplicaSetAvailable",
- "ttl": 1
}
], - "timeout": 1,
- "delay": 1
}, - "probeSpec": {
- "probes": [
- {
- "scheme": "http",
- "host": "testkube-api-server",
- "path": "/",
- "port": 80,
- "headers": {
- "Content-Type": "application/xml"
}
}
], - "timeout": 1,
- "delay": 1
}, - "action": "run",
- "execution": "test",
- "testSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "concurrencyPolicy": "allow"
}
]Create new test trigger
Create new test trigger CRD inside a Kubernetes cluster
Request Body schema:
test trigger body
| name required | string object name |
| namespace | string object kubernetes namespace |
object test trigger labels | |
| resource required | string (TestTriggerResources) Enum: "pod" "deployment" "statefulset" "daemonset" "service" "ingress" "event" "configmap" supported kubernetes resources for test triggers |
required | object (TestTriggerSelector) |
| event required | string listen for event for selected resource |
object (TestTriggerConditionSpec) | |
object (TestTriggerProbeSpec) | |
| action required | string (TestTriggerActions) Value: "run" supported actions for test triggers |
| execution required | string (TestTriggerExecutions) Enum: "test" "testsuite" supported test resources for test triggers |
required | object (TestTriggerSelector) |
| concurrencyPolicy | string (TestTriggerConcurrencyPolicies) Enum: "allow" "forbid" "replace" supported concurrency policies for test triggers |
Responses
Request samples
- Payload
{- "name": "name",
- "namespace": "testkube",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "resource": "pod",
- "resourceSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "event": "modified",
- "conditionSpec": {
- "conditions": [
- {
- "status": "True",
- "type": "Progressing",
- "reason": "NewReplicaSetAvailable",
- "ttl": 1
}
], - "timeout": 1,
- "delay": 1
}, - "probeSpec": {
- "probes": [
- {
- "scheme": "http",
- "host": "testkube-api-server",
- "path": "/",
- "port": 80,
- "headers": {
- "Content-Type": "application/xml"
}
}
], - "timeout": 1,
- "delay": 1
}, - "action": "run",
- "execution": "test",
- "testSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "concurrencyPolicy": "allow"
}Response samples
- 200
- 400
- 502
{- "name": "test1",
- "namespace": "testkube",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "resource": "pod",
- "resourceSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "event": "modified",
- "conditionSpec": {
- "conditions": [
- {
- "status": "True",
- "type": "Progressing",
- "reason": "NewReplicaSetAvailable",
- "ttl": 1
}
], - "timeout": 1,
- "delay": 1
}, - "probeSpec": {
- "probes": [
- {
- "scheme": "http",
- "host": "testkube-api-server",
- "path": "/",
- "port": 80,
- "headers": {
- "Content-Type": "application/xml"
}
}
], - "timeout": 1,
- "delay": 1
}, - "action": "run",
- "execution": "test",
- "testSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "concurrencyPolicy": "allow"
}Bulk update test triggers
Updates test triggers provided as an array in the request body
Request Body schema: application/json
array of test trigger upsert requests
| name required | string object name |
| namespace | string object kubernetes namespace |
object test trigger labels | |
| resource required | string (TestTriggerResources) Enum: "pod" "deployment" "statefulset" "daemonset" "service" "ingress" "event" "configmap" supported kubernetes resources for test triggers |
required | object (TestTriggerSelector) |
| event required | string listen for event for selected resource |
object (TestTriggerConditionSpec) | |
object (TestTriggerProbeSpec) | |
| action required | string (TestTriggerActions) Value: "run" supported actions for test triggers |
| execution required | string (TestTriggerExecutions) Enum: "test" "testsuite" supported test resources for test triggers |
required | object (TestTriggerSelector) |
| concurrencyPolicy | string (TestTriggerConcurrencyPolicies) Enum: "allow" "forbid" "replace" supported concurrency policies for test triggers |
Responses
Request samples
- Payload
[- {
- "name": "name",
- "namespace": "testkube",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "resource": "pod",
- "resourceSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "event": "modified",
- "conditionSpec": {
- "conditions": [
- {
- "status": "True",
- "type": "Progressing",
- "reason": "NewReplicaSetAvailable",
- "ttl": 1
}
], - "timeout": 1,
- "delay": 1
}, - "probeSpec": {
- "probes": [
- {
- "scheme": "http",
- "host": "testkube-api-server",
- "path": "/",
- "port": 80,
- "headers": {
- "Content-Type": "application/xml"
}
}
], - "timeout": 1,
- "delay": 1
}, - "action": "run",
- "execution": "test",
- "testSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "concurrencyPolicy": "allow"
}
]Response samples
- 200
- 400
- 502
[- {
- "name": "test1",
- "namespace": "testkube",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "resource": "pod",
- "resourceSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "event": "modified",
- "conditionSpec": {
- "conditions": [
- {
- "status": "True",
- "type": "Progressing",
- "reason": "NewReplicaSetAvailable",
- "ttl": 1
}
], - "timeout": 1,
- "delay": 1
}, - "probeSpec": {
- "probes": [
- {
- "scheme": "http",
- "host": "testkube-api-server",
- "path": "/",
- "port": 80,
- "headers": {
- "Content-Type": "application/xml"
}
}
], - "timeout": 1,
- "delay": 1
}, - "action": "run",
- "execution": "test",
- "testSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "concurrencyPolicy": "allow"
}
]Delete test triggers
Deletes all or labeled test triggers
query Parameters
| namespace | string Default: "testkube" Namespace of the object |
| selector | string Labels to filter by |
Responses
Response samples
- 400
- 404
- 502
[- {
- "title": "Invalid test name",
- "status": 500,
- "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
}
]Get test trigger by ID
Get test trigger by ID from CRD in kubernetes cluster
path Parameters
| id required | string unique id of the object |
query Parameters
| namespace | string Default: "testkube" Namespace of the object |
Responses
Response samples
- 200
- 404
- 502
{- "name": "test1",
- "namespace": "testkube",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "resource": "pod",
- "resourceSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "event": "modified",
- "conditionSpec": {
- "conditions": [
- {
- "status": "True",
- "type": "Progressing",
- "reason": "NewReplicaSetAvailable",
- "ttl": 1
}
], - "timeout": 1,
- "delay": 1
}, - "probeSpec": {
- "probes": [
- {
- "scheme": "http",
- "host": "testkube-api-server",
- "path": "/",
- "port": 80,
- "headers": {
- "Content-Type": "application/xml"
}
}
], - "timeout": 1,
- "delay": 1
}, - "action": "run",
- "execution": "test",
- "testSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "concurrencyPolicy": "allow"
}Update test trigger
Update test trigger
path Parameters
| id required | string unique id of the object |
query Parameters
| namespace | string Default: "testkube" Namespace of the object |
Request Body schema:
test trigger upsert request
| name required | string object name |
| namespace | string object kubernetes namespace |
object test trigger labels | |
| resource required | string (TestTriggerResources) Enum: "pod" "deployment" "statefulset" "daemonset" "service" "ingress" "event" "configmap" supported kubernetes resources for test triggers |
required | object (TestTriggerSelector) |
| event required | string listen for event for selected resource |
object (TestTriggerConditionSpec) | |
object (TestTriggerProbeSpec) | |
| action required | string (TestTriggerActions) Value: "run" supported actions for test triggers |
| execution required | string (TestTriggerExecutions) Enum: "test" "testsuite" supported test resources for test triggers |
required | object (TestTriggerSelector) |
| concurrencyPolicy | string (TestTriggerConcurrencyPolicies) Enum: "allow" "forbid" "replace" supported concurrency policies for test triggers |
Responses
Request samples
- Payload
{- "name": "name",
- "namespace": "testkube",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "resource": "pod",
- "resourceSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "event": "modified",
- "conditionSpec": {
- "conditions": [
- {
- "status": "True",
- "type": "Progressing",
- "reason": "NewReplicaSetAvailable",
- "ttl": 1
}
], - "timeout": 1,
- "delay": 1
}, - "probeSpec": {
- "probes": [
- {
- "scheme": "http",
- "host": "testkube-api-server",
- "path": "/",
- "port": 80,
- "headers": {
- "Content-Type": "application/xml"
}
}
], - "timeout": 1,
- "delay": 1
}, - "action": "run",
- "execution": "test",
- "testSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "concurrencyPolicy": "allow"
}Response samples
- 200
- 400
- 404
- 502
{- "name": "test1",
- "namespace": "testkube",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "resource": "pod",
- "resourceSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "event": "modified",
- "conditionSpec": {
- "conditions": [
- {
- "status": "True",
- "type": "Progressing",
- "reason": "NewReplicaSetAvailable",
- "ttl": 1
}
], - "timeout": 1,
- "delay": 1
}, - "probeSpec": {
- "probes": [
- {
- "scheme": "http",
- "host": "testkube-api-server",
- "path": "/",
- "port": 80,
- "headers": {
- "Content-Type": "application/xml"
}
}
], - "timeout": 1,
- "delay": 1
}, - "action": "run",
- "execution": "test",
- "testSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "concurrencyPolicy": "allow"
}Delete test trigger
Deletes a test trigger
path Parameters
| id required | string unique id of the object |
query Parameters
| namespace | string Default: "testkube" Namespace of the object |
Responses
Response samples
- 404
- 502
[- {
- "title": "Invalid test name",
- "status": 500,
- "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
}
]Create new test suite
Create new test suite action
Request Body schema:
test details body
| name required | string object name |
| namespace required | string object kubernetes namespace |
| description | string |
Array of objects (TestSuiteBatchStep) Run these batch steps before whole suite | |
Array of objects (TestSuiteBatchStep) Batch steps to run | |
Array of objects (TestSuiteBatchStep) Run these batch steps after whole suite | |
object test suite labels | |
| schedule | string schedule to run test suite |
| repeats | integer Default: 1 |
| created | string <date-time> |
object (TestSuiteExecutionRequest) test suite execution request body | |
required | object (TestSuiteStatus) test suite status |
| readOnly | boolean if test suite is offline and cannot be executed |
Responses
Request samples
- Payload
{- "name": "name",
- "namespace": "testkube",
- "description": "collection of tests",
- "before": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "steps": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "after": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}, - "schedule": "* * * * *",
- "repeats": 1,
- "created": "2019-08-24T14:15:22Z",
- "executionRequest": {
- "name": "testing with 1000 users",
- "number": 1,
- "namespace": "testkube",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "labels": {
- "users": "3",
- "prefix": "some-"
}, - "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "timeout": 1,
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "concurrencyLevel": 10,
- "testSuiteExecutionName": "string"
}, - "status": {
- "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "status": "queued"
}
}, - "readOnly": true
}Response samples
- 201
- 400
- 502
{- "name": "test-suite1",
- "namespace": "testkube",
- "description": "collection of tests",
- "before": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "steps": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "after": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}, - "schedule": "* * * * *",
- "repeats": 1,
- "created": "2019-08-24T14:15:22Z",
- "executionRequest": {
- "name": "testing with 1000 users",
- "number": 1,
- "namespace": "testkube",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "secretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "labels": {
- "users": "3",
- "prefix": "some-"
}, - "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "timeout": 1,
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "concurrencyLevel": 10,
- "testSuiteExecutionName": "string"
}, - "status": {
- "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "status": "queued"
}
}, - "readOnly": true
}Get all test suites
Returns array of test suites
query Parameters
| selector | string Labels to filter by |
| textSearch | string Default: "" text to search in name and test name |
Responses
Response samples
- 200
- 400
- 502
[- {
- "name": "test-suite1",
- "namespace": "testkube",
- "description": "collection of tests",
- "before": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "steps": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "after": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}, - "schedule": "* * * * *",
- "repeats": 1,
- "created": "2019-08-24T14:15:22Z",
- "executionRequest": {
- "name": "testing with 1000 users",
- "number": 1,
- "namespace": "testkube",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "secretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "labels": {
- "users": "3",
- "prefix": "some-"
}, - "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "timeout": 1,
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "concurrencyLevel": 10,
- "testSuiteExecutionName": "string"
}, - "status": {
- "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "status": "queued"
}
}, - "readOnly": true
}
]Delete test suites
Deletes all or labeled test suites
query Parameters
| selector | string Labels to filter by |
Responses
Response samples
- 404
- 502
[- {
- "title": "Invalid test name",
- "status": 500,
- "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
}
]Get test suite by ID
Returns test suite with given name
path Parameters
| id required | string unique id of the object |
Responses
Response samples
- 200
- 404
- 500
- 502
{- "name": "test-suite1",
- "namespace": "testkube",
- "description": "collection of tests",
- "before": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "steps": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "after": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}, - "schedule": "* * * * *",
- "repeats": 1,
- "created": "2019-08-24T14:15:22Z",
- "executionRequest": {
- "name": "testing with 1000 users",
- "number": 1,
- "namespace": "testkube",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "secretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "labels": {
- "users": "3",
- "prefix": "some-"
}, - "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "timeout": 1,
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "concurrencyLevel": 10,
- "testSuiteExecutionName": "string"
}, - "status": {
- "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "status": "queued"
}
}, - "readOnly": true
}Update test suite
Update test based on test suite content or git based data
path Parameters
| id required | string unique id of the object |
Request Body schema:
test suite details body
| name required | string object name |
| namespace | string object kubernetes namespace |
| description | string |
Array of objects (TestSuiteBatchStep) Run these batch steps before whole suite | |
Array of objects (TestSuiteBatchStep) Batch steps to run | |
Array of objects (TestSuiteBatchStep) Run these batch steps after whole suite | |
object test suite labels | |
| schedule | string schedule to run test suite |
| repeats | integer Default: 1 |
| created | string <date-time> |
object (TestSuiteExecutionRequest) test suite execution request body | |
required | object (TestSuiteStatus) test suite status |
| readOnly | boolean if test suite is offline and cannot be executed |
Responses
Request samples
- Payload
{- "name": "name",
- "namespace": "testkube",
- "description": "collection of tests",
- "before": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "steps": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "after": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}, - "schedule": "* * * * *",
- "repeats": 1,
- "created": "2019-08-24T14:15:22Z",
- "executionRequest": {
- "name": "testing with 1000 users",
- "number": 1,
- "namespace": "testkube",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "labels": {
- "users": "3",
- "prefix": "some-"
}, - "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "timeout": 1,
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "concurrencyLevel": 10,
- "testSuiteExecutionName": "string"
}, - "status": {
- "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "status": "queued"
}
}, - "readOnly": true
}Response samples
- 200
- 400
- 404
- 502
{- "name": "test-suite1",
- "namespace": "testkube",
- "description": "collection of tests",
- "before": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "steps": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "after": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}, - "schedule": "* * * * *",
- "repeats": 1,
- "created": "2019-08-24T14:15:22Z",
- "executionRequest": {
- "name": "testing with 1000 users",
- "number": 1,
- "namespace": "testkube",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "secretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "labels": {
- "users": "3",
- "prefix": "some-"
}, - "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "timeout": 1,
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "concurrencyLevel": 10,
- "testSuiteExecutionName": "string"
}, - "status": {
- "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "status": "queued"
}
}, - "readOnly": true
}Get test suite metrics
Gets test suite metrics for given tests executions, with particular execution status and timings
path Parameters
| id required | string unique id of the object |
query Parameters
| last | integer Default: 7 last N days to show |
| limit | integer Default: 7 limit records count same as pageSize |
Responses
Response samples
- 200
- 500
{- "passFailRatio": 50,
- "executionDurationP50": "7m2.71s",
- "executionDurationP50ms": 422,
- "executionDurationP90": "7m2.71s",
- "executionDurationP90ms": 422,
- "executionDurationP95": "7m2.71s",
- "executionDurationP95ms": 422,
- "executionDurationP99": "7m2.71s",
- "executionDurationP99ms": 422,
- "totalExecutions": 2,
- "failedExecutions": 1,
- "executions": [
- {
- "executionId": "string",
- "duration": "string",
- "durationMs": 0,
- "status": "string",
- "name": "string",
- "startTime": "2019-08-24T14:15:22Z"
}
]
}List tests for test suite
List available tests for test suite
path Parameters
| id required | string unique id of the object |
Responses
Response samples
- 200
- 404
- 502
[- {
- "name": "test1",
- "namespace": "testkube",
- "description": "this test is used for that purpose",
- "type": "postman/collection",
- "content": {
- "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}, - "source": "my-private-repository-test",
- "created": "2022-07-30T06:54:15Z",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "schedule": "* * * * *",
- "readOnly": true,
- "uploads": [
- "settings/config.txt"
], - "executionRequest": {
- "id": "62f395e004109209b50edfc1",
- "name": "testing with 1000 users",
- "testSuiteName": "test-suite1",
- "number": 0,
- "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "namespace": "testkube",
- "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "testSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "testSuiteSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "args_mode": "append",
- "image": "kubeshop/testkube-executor-custom:1.10.11-dev-0a9c91",
- "imagePullSecrets": [
- {
- "name": "string"
}
], - "envs": {
- "record": "true",
- "prefix": "some-"
}, - "secretEnvs": {
- "secret_key_name1": "secret-name",
- "secret_Key_name2": "secret-name"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "negativeTest": false,
- "isNegativeTestChangedOnRun": false,
- "activeDeadlineSeconds": 1,
- "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "envConfigMaps": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "envSecrets": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}, - "status": {
- "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "number": 1,
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "status": "queued"
}
}
}
]Abort all executions of a test suite
Abort all test executions of a test suite
path Parameters
| id required | string unique id of the object |
Responses
Response samples
- 404
- 500
- 502
[- {
- "title": "Invalid test name",
- "status": 500,
- "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
}
]Get all test suite with executions
Returns array of test suite with executions
query Parameters
| selector | string Labels to filter by |
| textSearch | string Default: "" text to search in name and test name |
| status | string (TestSuiteExecutionStatus) Enum: "queued" "running" "passed" "failed" "aborting" "aborted" "timeout" optional status filter containing multiple values separated by comma |
| pageSize | integer Default: 100 the number of executions to get, setting to 0 will return only totals |
| page | integer Default: 0 the page index to start at |
Responses
Response samples
- 200
- 400
- 500
- 502
[- {
- "testSuite": {
- "name": "test-suite1",
- "namespace": "testkube",
- "description": "collection of tests",
- "before": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "steps": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "after": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}, - "schedule": "* * * * *",
- "repeats": 1,
- "created": "2019-08-24T14:15:22Z",
- "executionRequest": {
- "name": "testing with 1000 users",
- "number": 1,
- "namespace": "testkube",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "secretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "labels": {
- "users": "3",
- "prefix": "some-"
}, - "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "timeout": 1,
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "concurrencyLevel": 10,
- "testSuiteExecutionName": "string"
}, - "status": {
- "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "status": "queued"
}
}, - "readOnly": true
}, - "latestExecution": {
- "id": "62f395e004109209b50edfc1",
- "name": "test-suite1.needlessly-sweet-imp",
- "testSuiteName": "test-suite1",
- "status": "queued",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "00:00:09",
- "durationMs": 9009,
- "execution": [
- {
- "execute": [
- {
- "id": "62f395e004109209b50edfc4",
- "name": "run:testkube/test1",
- "testName": "test1",
- "status": "queued",
- "type": "executeTest"
}
]
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}
}
}
]Get test suite by ID with execution
Returns test suite with given name with execution
path Parameters
| id required | string unique id of the object |
Responses
Response samples
- 200
- 500
{- "testSuite": {
- "name": "test-suite1",
- "namespace": "testkube",
- "description": "collection of tests",
- "before": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "steps": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "after": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}, - "schedule": "* * * * *",
- "repeats": 1,
- "created": "2019-08-24T14:15:22Z",
- "executionRequest": {
- "name": "testing with 1000 users",
- "number": 1,
- "namespace": "testkube",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "secretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "labels": {
- "users": "3",
- "prefix": "some-"
}, - "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "timeout": 1,
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "concurrencyLevel": 10,
- "testSuiteExecutionName": "string"
}, - "status": {
- "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "status": "queued"
}
}, - "readOnly": true
}, - "latestExecution": {
- "id": "62f395e004109209b50edfc1",
- "name": "test-suite1.needlessly-sweet-imp",
- "testSuite": {
- "namespace": "testkube",
- "name": "name"
}, - "status": "queued",
- "envs": {
- "record": "true",
- "prefix": "some-"
}, - "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "secretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "2m",
- "durationMs": 6000,
- "stepResults": [
- {
- "step": {
- "stopTestOnFailure": true,
- "execute": {
- "namespace": "testkube",
- "name": "name"
}, - "delay": {
- "duration": 0
}
}, - "test": {
- "namespace": "testkube",
- "name": "name"
}, - "execution": {
- "id": "62f395e004109209b50edfc4",
- "testName": "example-test",
- "testSuiteName": "test-suite1",
- "testNamespace": "testkube",
- "testType": "postman/collection",
- "name": "test-suite1-example-test-1",
- "number": 1,
- "envs": {
- "record": "true",
- "prefix": "some-"
}, - "command": [
- "curl"
], - "args": [
- "--concurrency",
- "2",
- "--remote",
- "--some",
- "blabla"
], - "args_mode": "append",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "testSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "testSuiteSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "content": {
- "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}, - "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "88s",
- "durationMs": 10000,
- "executionResult": {
- "status": "queued",
- "output": "string",
- "outputType": "text/plain",
- "errorMessage": "string",
- "steps": [
- {
- "name": "step1",
- "duration": "10m0s",
- "status": "passed",
- "assertionResults": [
- {
- "name": null,
- "status": null,
- "errorMessage": null
}
]
}
], - "reports": {
- "junit": "string"
}
}, - "labels": {
- "env": "prod",
- "app": "backend"
}, - "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "containerShell": "/bin/sh",
- "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}
}
], - "executeStepResults": [
- {
- "step": {
- "stopOnFailure": true,
- "downloadArtifacts": {
- "allPreviousSteps": false,
- "previousStepNumbers": [
- 0
], - "previousTestNames": [
- "string"
]
}, - "execute": [
- {
- "test": "name",
- "delay": "1s",
- "executionRequest": {
- "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "args_mode": "append",
- "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "negativeTest": false,
- "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "runningContext": {
- "type": "userCLI",
- "context": "string"
}
}
}
]
}, - "execute": [
- {
- "step": {
- "test": "name",
- "delay": "1s",
- "executionRequest": {
- "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "args_mode": "append",
- "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "negativeTest": false,
- "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "runningContext": {
- "type": "userCLI",
- "context": "string"
}
}
}, - "test": {
- "namespace": "testkube",
- "name": "name"
}, - "execution": {
- "id": "62f395e004109209b50edfc4",
- "testName": "example-test",
- "testSuiteName": "test-suite1",
- "testNamespace": "testkube",
- "testType": "postman/collection",
- "name": "test-suite1-example-test-1",
- "number": 1,
- "envs": {
- "record": "true",
- "prefix": "some-"
}, - "command": [
- "curl"
], - "args": [
- "--concurrency",
- "2",
- "--remote",
- "--some",
- "blabla"
], - "args_mode": "append",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "testSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "testSuiteSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "content": {
- "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": null,
- "name": null,
- "key": null
}, - "tokenSecret": {
- "namespace": null,
- "name": null,
- "key": null
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}, - "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "88s",
- "durationMs": 10000,
- "executionResult": {
- "status": "queued",
- "output": "string",
- "outputType": "text/plain",
- "errorMessage": "string",
- "steps": [
- {
- "name": null,
- "duration": null,
- "status": null,
- "assertionResults": [ ]
}
], - "reports": {
- "junit": "string"
}
}, - "labels": {
- "env": "prod",
- "app": "backend"
}, - "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "containerShell": "/bin/sh",
- "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": null,
- "memory": null
}, - "limits": {
- "cpu": null,
- "memory": null
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}
}
], - "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "2m"
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "testSuiteExecutionName": "string"
}
}Starts new test suite execution
New test suite execution returns new execution details on successful execution start
path Parameters
| id required | string unique id of the object |
query Parameters
| namespace | string Default: "testkube" Namespace of the object |
| last | integer Default: 7 last N days to show |
| testSuiteExecutionName | string test suite execution name stated the test suite execution |
Request Body schema: application/json
body passed to configure execution
| name | string test execution custom name |
| number | integer test suite execution number |
| namespace | string test kubernetes namespace ("testkube" when not set) |
object (Variables) execution variables passed to executor converted to vars for usage in tests | |
object test suite labels | |
object execution labels | |
| sync | boolean whether to start execution sync or async |
| httpProxy | string http proxy for executor containers |
| httpsProxy | string https proxy for executor containers |
| timeout | integer <int32> duration in seconds the test suite may be active, until its stopped |
object (TestContentRequest) test content request body | |
object (RunningContext) running context for test or test suite execution | |
| jobTemplate | string job template extensions |
| jobTemplateReference | string name of the template resource |
| cronJobTemplate | string cron job template extensions |
| cronJobTemplateReference | string name of the template resource |
| scraperTemplate | string scraper template extensions |
| scraperTemplateReference | string name of the template resource |
| pvcTemplate | string pvc template extensions |
| pvcTemplateReference | string name of the template resource |
| concurrencyLevel | integer <int32> number of tests run in parallel |
| testSuiteExecutionName | string test suite execution name started the test suite execution |
Responses
Request samples
- Payload
{- "name": "testing with 1000 users",
- "number": 1,
- "namespace": "testkube",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "labels": {
- "users": "3",
- "prefix": "some-"
}, - "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "timeout": 1,
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "concurrencyLevel": 10,
- "testSuiteExecutionName": "string"
}Response samples
- 201
- 400
- 404
- 500
- 502
{- "totals": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "filtered": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "results": [
- {
- "id": "62f395e004109209b50edfc1",
- "name": "test-suite1.needlessly-sweet-imp",
- "testSuiteName": "test-suite1",
- "status": "queued",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "00:00:09",
- "durationMs": 9009,
- "execution": [
- {
- "execute": [
- {
- "id": "62f395e004109209b50edfc4",
- "name": "run:testkube/test1",
- "testName": "test1",
- "status": "queued",
- "type": "executeTest"
}
]
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}
}
]
}Get all test suite executions
Returns array of all available test suite executions
path Parameters
| id required | string unique id of the object |
query Parameters
| pageSize | integer Default: 100 the number of executions to get, setting to 0 will return only totals |
| page | integer Default: 0 the page index to start at |
| status | string (TestSuiteExecutionStatus) Enum: "queued" "running" "passed" "failed" "aborting" "aborted" "timeout" optional status filter containing multiple values separated by comma |
| startDate | string <date> startDate for filtering in ISO-8601 format, i.e. "yyyy-mm-dd" |
| endDate | string <date> endDate for filtering |
Responses
Response samples
- 200
- 500
{- "totals": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "filtered": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "results": [
- {
- "id": "62f395e004109209b50edfc1",
- "name": "test-suite1.needlessly-sweet-imp",
- "testSuiteName": "test-suite1",
- "status": "queued",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "00:00:09",
- "durationMs": 9009,
- "execution": [
- {
- "execute": [
- {
- "id": "62f395e004109209b50edfc4",
- "name": "run:testkube/test1",
- "testName": "test1",
- "status": "queued",
- "type": "executeTest"
}
]
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}
}
]
}Get test suite execution
Returns test suite execution with given executionID
path Parameters
| id required | string unique id of the object |
| executionID required | string unique id of the object execution |
Responses
Response samples
- 200
- 404
- 500
- 502
{- "id": "62f395e004109209b50edfc1",
- "name": "test-suite1.needlessly-sweet-imp",
- "testSuite": {
- "namespace": "testkube",
- "name": "name"
}, - "status": "queued",
- "envs": {
- "record": "true",
- "prefix": "some-"
}, - "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "secretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "2m",
- "durationMs": 6000,
- "stepResults": [
- {
- "step": {
- "stopTestOnFailure": true,
- "execute": {
- "namespace": "testkube",
- "name": "name"
}, - "delay": {
- "duration": 0
}
}, - "test": {
- "namespace": "testkube",
- "name": "name"
}, - "execution": {
- "id": "62f395e004109209b50edfc4",
- "testName": "example-test",
- "testSuiteName": "test-suite1",
- "testNamespace": "testkube",
- "testType": "postman/collection",
- "name": "test-suite1-example-test-1",
- "number": 1,
- "envs": {
- "record": "true",
- "prefix": "some-"
}, - "command": [
- "curl"
], - "args": [
- "--concurrency",
- "2",
- "--remote",
- "--some",
- "blabla"
], - "args_mode": "append",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "testSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "testSuiteSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "content": {
- "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}, - "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "88s",
- "durationMs": 10000,
- "executionResult": {
- "status": "queued",
- "output": "string",
- "outputType": "text/plain",
- "errorMessage": "string",
- "steps": [
- {
- "name": "step1",
- "duration": "10m0s",
- "status": "passed",
- "assertionResults": [
- {
- "name": "assertion1",
- "status": "passed",
- "errorMessage": "string"
}
]
}
], - "reports": {
- "junit": "string"
}
}, - "labels": {
- "env": "prod",
- "app": "backend"
}, - "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "containerShell": "/bin/sh",
- "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}
}
], - "executeStepResults": [
- {
- "step": {
- "stopOnFailure": true,
- "downloadArtifacts": {
- "allPreviousSteps": false,
- "previousStepNumbers": [
- 0
], - "previousTestNames": [
- "string"
]
}, - "execute": [
- {
- "test": "name",
- "delay": "1s",
- "executionRequest": {
- "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "args_mode": "append",
- "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "negativeTest": false,
- "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "runningContext": {
- "type": "userCLI",
- "context": "string"
}
}
}
]
}, - "execute": [
- {
- "step": {
- "test": "name",
- "delay": "1s",
- "executionRequest": {
- "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "args_mode": "append",
- "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "negativeTest": false,
- "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "runningContext": {
- "type": "userCLI",
- "context": "string"
}
}
}, - "test": {
- "namespace": "testkube",
- "name": "name"
}, - "execution": {
- "id": "62f395e004109209b50edfc4",
- "testName": "example-test",
- "testSuiteName": "test-suite1",
- "testNamespace": "testkube",
- "testType": "postman/collection",
- "name": "test-suite1-example-test-1",
- "number": 1,
- "envs": {
- "record": "true",
- "prefix": "some-"
}, - "command": [
- "curl"
], - "args": [
- "--concurrency",
- "2",
- "--remote",
- "--some",
- "blabla"
], - "args_mode": "append",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "testSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "testSuiteSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "content": {
- "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}, - "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "88s",
- "durationMs": 10000,
- "executionResult": {
- "status": "queued",
- "output": "string",
- "outputType": "text/plain",
- "errorMessage": "string",
- "steps": [
- {
- "name": "step1",
- "duration": "10m0s",
- "status": "passed",
- "assertionResults": [
- null
]
}
], - "reports": {
- "junit": "string"
}
}, - "labels": {
- "env": "prod",
- "app": "backend"
}, - "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "containerShell": "/bin/sh",
- "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}
}
], - "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "2m"
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "testSuiteExecutionName": "string"
}Aborts testsuite execution
Aborts testsuite execution with given executionID
path Parameters
| id required | string unique id of the object |
| executionID required | string unique id of the object execution |
Responses
Response samples
- 404
- 500
[- {
- "title": "Invalid test name",
- "status": 500,
- "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
}
]Get test suite execution artifacts
Returns test suite execution artifacts with given executionID
path Parameters
| id required | string unique id of the object |
| executionID required | string unique id of the object execution |
Responses
Response samples
- 200
- 404
- 500
{- "name": "string",
- "size": 0,
- "executionName": "test-1",
- "status": "ready"
}Starts new test suite executions
New test suite executions returns new executions details on successful executions start
query Parameters
| namespace | string Default: "testkube" Namespace of the object |
| selector | string Labels to filter by |
| concurrency | integer Default: 10 |
Request Body schema: application/json
body passed to configure executions
| name | string test execution custom name |
| number | integer test suite execution number |
| namespace | string test kubernetes namespace ("testkube" when not set) |
object (Variables) execution variables passed to executor converted to vars for usage in tests | |
object test suite labels | |
object execution labels | |
| sync | boolean whether to start execution sync or async |
| httpProxy | string http proxy for executor containers |
| httpsProxy | string https proxy for executor containers |
| timeout | integer <int32> duration in seconds the test suite may be active, until its stopped |
object (TestContentRequest) test content request body | |
object (RunningContext) running context for test or test suite execution | |
| jobTemplate | string job template extensions |
| jobTemplateReference | string name of the template resource |
| cronJobTemplate | string cron job template extensions |
| cronJobTemplateReference | string name of the template resource |
| scraperTemplate | string scraper template extensions |
| scraperTemplateReference | string name of the template resource |
| pvcTemplate | string pvc template extensions |
| pvcTemplateReference | string name of the template resource |
| concurrencyLevel | integer <int32> number of tests run in parallel |
| testSuiteExecutionName | string test suite execution name started the test suite execution |
Responses
Request samples
- Payload
{- "name": "testing with 1000 users",
- "number": 1,
- "namespace": "testkube",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "labels": {
- "users": "3",
- "prefix": "some-"
}, - "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "timeout": 1,
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "concurrencyLevel": 10,
- "testSuiteExecutionName": "string"
}Response samples
- 201
- 400
- 500
- 502
[- {
- "totals": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "filtered": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "results": [
- {
- "id": "62f395e004109209b50edfc1",
- "name": "test-suite1.needlessly-sweet-imp",
- "testSuiteName": "test-suite1",
- "status": "queued",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "00:00:09",
- "durationMs": 9009,
- "execution": [
- {
- "execute": [
- {
- "id": "62f395e004109209b50edfc4",
- "name": "run:testkube/test1",
- "testName": "test1",
- "status": "queued",
- "type": "executeTest"
}
]
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}
}
]
}
]Get all test suite executions
Returns array of test suite executions
query Parameters
| last | integer Default: 7 last N days to show |
| test | string Default: "" test namespaced name to filter |
| textSearch | string Default: "" text to search in name and test name |
| pageSize | integer Default: 100 the number of executions to get, setting to 0 will return only totals |
| page | integer Default: 0 the page index to start at |
| status | string (TestSuiteExecutionStatus) Enum: "queued" "running" "passed" "failed" "aborting" "aborted" "timeout" optional status filter containing multiple values separated by comma |
| startDate | string <date> startDate for filtering in ISO-8601 format, i.e. "yyyy-mm-dd" |
| endDate | string <date> endDate for filtering |
| selector | string Labels to filter by |
Responses
Response samples
- 200
- 500
{- "totals": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "filtered": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "results": [
- {
- "id": "62f395e004109209b50edfc1",
- "name": "test-suite1.needlessly-sweet-imp",
- "testSuiteName": "test-suite1",
- "status": "queued",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "00:00:09",
- "durationMs": 9009,
- "execution": [
- {
- "execute": [
- {
- "id": "62f395e004109209b50edfc4",
- "name": "run:testkube/test1",
- "testName": "test1",
- "status": "queued",
- "type": "executeTest"
}
]
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}
}
]
}Get test suite execution by ID
Returns test suite execution with given executionID
path Parameters
| executionID required | string unique id of the object execution |
query Parameters
| last | integer Default: 7 last N days to show |
Responses
Response samples
- 200
- 500
{- "id": "62f395e004109209b50edfc1",
- "name": "test-suite1.needlessly-sweet-imp",
- "testSuite": {
- "namespace": "testkube",
- "name": "name"
}, - "status": "queued",
- "envs": {
- "record": "true",
- "prefix": "some-"
}, - "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "secretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "2m",
- "durationMs": 6000,
- "stepResults": [
- {
- "step": {
- "stopTestOnFailure": true,
- "execute": {
- "namespace": "testkube",
- "name": "name"
}, - "delay": {
- "duration": 0
}
}, - "test": {
- "namespace": "testkube",
- "name": "name"
}, - "execution": {
- "id": "62f395e004109209b50edfc4",
- "testName": "example-test",
- "testSuiteName": "test-suite1",
- "testNamespace": "testkube",
- "testType": "postman/collection",
- "name": "test-suite1-example-test-1",
- "number": 1,
- "envs": {
- "record": "true",
- "prefix": "some-"
}, - "command": [
- "curl"
], - "args": [
- "--concurrency",
- "2",
- "--remote",
- "--some",
- "blabla"
], - "args_mode": "append",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "testSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "testSuiteSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "content": {
- "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}, - "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "88s",
- "durationMs": 10000,
- "executionResult": {
- "status": "queued",
- "output": "string",
- "outputType": "text/plain",
- "errorMessage": "string",
- "steps": [
- {
- "name": "step1",
- "duration": "10m0s",
- "status": "passed",
- "assertionResults": [
- {
- "name": "assertion1",
- "status": "passed",
- "errorMessage": "string"
}
]
}
], - "reports": {
- "junit": "string"
}
}, - "labels": {
- "env": "prod",
- "app": "backend"
}, - "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "containerShell": "/bin/sh",
- "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}
}
], - "executeStepResults": [
- {
- "step": {
- "stopOnFailure": true,
- "downloadArtifacts": {
- "allPreviousSteps": false,
- "previousStepNumbers": [
- 0
], - "previousTestNames": [
- "string"
]
}, - "execute": [
- {
- "test": "name",
- "delay": "1s",
- "executionRequest": {
- "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "args_mode": "append",
- "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "negativeTest": false,
- "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "runningContext": {
- "type": "userCLI",
- "context": "string"
}
}
}
]
}, - "execute": [
- {
- "step": {
- "test": "name",
- "delay": "1s",
- "executionRequest": {
- "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "args_mode": "append",
- "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "negativeTest": false,
- "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "runningContext": {
- "type": "userCLI",
- "context": "string"
}
}
}, - "test": {
- "namespace": "testkube",
- "name": "name"
}, - "execution": {
- "id": "62f395e004109209b50edfc4",
- "testName": "example-test",
- "testSuiteName": "test-suite1",
- "testNamespace": "testkube",
- "testType": "postman/collection",
- "name": "test-suite1-example-test-1",
- "number": 1,
- "envs": {
- "record": "true",
- "prefix": "some-"
}, - "command": [
- "curl"
], - "args": [
- "--concurrency",
- "2",
- "--remote",
- "--some",
- "blabla"
], - "args_mode": "append",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "testSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "testSuiteSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "content": {
- "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}, - "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "88s",
- "durationMs": 10000,
- "executionResult": {
- "status": "queued",
- "output": "string",
- "outputType": "text/plain",
- "errorMessage": "string",
- "steps": [
- {
- "name": "step1",
- "duration": "10m0s",
- "status": "passed",
- "assertionResults": [
- null
]
}
], - "reports": {
- "junit": "string"
}
}, - "labels": {
- "env": "prod",
- "app": "backend"
}, - "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "containerShell": "/bin/sh",
- "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}
}
], - "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "2m"
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "testSuiteExecutionName": "string"
}Aborts testsuite execution
Aborts testsuite execution with given executionID
path Parameters
| executionID required | string unique id of the object execution |
Responses
Response samples
- 502
[- {
- "title": "Invalid test name",
- "status": 500,
- "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
}
]Get test suite execution artifacts
Returns test suite execution artifacts with given executionID
path Parameters
| executionID required | string unique id of the object execution |
Responses
Response samples
- 200
- 500
{- "name": "string",
- "size": 0,
- "executionName": "test-1",
- "status": "ready"
}Starts new test executions
New test executions returns new executions details on successful executions start
query Parameters
| namespace | string Default: "testkube" Namespace of the object |
| selector | string Labels to filter by |
| executionSelector | string Execution Labels to add to executions |
| concurrency | integer Default: 10 |
Request Body schema: application/json
body passed to configure executions
| id | string <bson objectId> execution id |
| name | string test execution custom name |
| testSuiteName | string unique test suite name (CRD Test suite name), if it's run as a part of test suite |
| number | integer test execution number |
object test execution labels | |
| namespace | string test kubernetes namespace ("testkube" when not set) |
| isVariablesFileUploaded | boolean in case the variables file is too big, it will be uploaded |
| variablesFile | string variables file content - need to be in format for particular executor (e.g. postman envs file) |
object (Variables) execution variables passed to executor converted to vars for usage in tests | |
| command | Array of strings executor image command |
| args | Array of strings additional executor binary arguments |
| args_mode | string Enum: "append" "override" "replace" usage mode for arguments |
| image | string container image, executor will run inside this image |
Array of objects (LocalObjectReference) container image pull secrets | |
object Deprecated Environment variables passed to executor. Deprecated: use Basic Variables instead | |
object Deprecated Execution variables passed to executor from secrets. Deprecated: use Secret Variables instead | |
| sync | boolean whether to start execution sync or async |
| httpProxy | string http proxy for executor containers |
| httpsProxy | string https proxy for executor containers |
| negativeTest | boolean whether to run test as negative test |
| isNegativeTestChangedOnRun | boolean whether negativeTest was changed by user |
| activeDeadlineSeconds | integer <int64> duration in seconds the test may be active, until its stopped |
| uploads | Array of strings list of file paths that need to be copied into the test from uploads |
| bucketName | string minio bucket name to get uploads from |
object (ArtifactRequest) artifact request body with test artifacts | |
| jobTemplate | string job template extensions |
| jobTemplateReference | string name of the template resource |
| cronJobTemplate | string cron job template extensions |
| cronJobTemplateReference | string name of the template resource |
object (TestContentRequest) test content request body | |
| preRunScript | string script to run before test execution |
| postRunScript | string script to run after test execution |
| executePostRunScriptBeforeScraping | boolean execute post run script before scraping (prebuilt executor only) |
| sourceScripts | boolean run scripts using source command (container executor only) |
| scraperTemplate | string scraper template extensions |
| scraperTemplateReference | string name of the template resource |
| pvcTemplate | string pvc template extensions |
| pvcTemplateReference | string name of the template resource |
Array of objects (EnvReference) config map references | |
Array of objects (EnvReference) secret references | |
object (RunningContext) running context for test or test suite execution | |
| testExecutionName | string test execution name started the test execution |
| downloadArtifactExecutionIDs | Array of strings execution ids for artifacts to download |
| downloadArtifactTestNames | Array of strings test names for artifacts to download from latest executions |
object (PodRequest) pod request body | |
| executionNamespace | string namespace for test execution (Pro edition only) |
Responses
Request samples
- Payload
{- "id": "62f395e004109209b50edfc1",
- "name": "testing with 1000 users",
- "testSuiteName": "test-suite1",
- "number": 0,
- "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "namespace": "testkube",
- "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "args_mode": "append",
- "image": "kubeshop/testkube-executor-custom:1.10.11-dev-0a9c91",
- "imagePullSecrets": [
- {
- "name": "string"
}
], - "envs": {
- "record": "true",
- "prefix": "some-"
}, - "secretEnvs": {
- "secret_key_name1": "secret-name",
- "secret_Key_name2": "secret-name"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "negativeTest": false,
- "isNegativeTestChangedOnRun": false,
- "activeDeadlineSeconds": 1,
- "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "envConfigMaps": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "envSecrets": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}Response samples
- 201
- 400
- 404
- 500
- 502
[- {
- "status": "queued",
- "output": "string",
- "outputType": "text/plain",
- "errorMessage": "string",
- "steps": [
- {
- "name": "step1",
- "duration": "10m0s",
- "status": "passed",
- "assertionResults": [
- {
- "name": "assertion1",
- "status": "passed",
- "errorMessage": "string"
}
]
}
], - "reports": {
- "junit": "string"
}
}
]Get all test executions
Returns array of test executions
query Parameters
| test | string Default: "" test namespaced name to filter |
| type | string Default: "" object type |
| textSearch | string Default: "" text to search in name and test name |
| pageSize | integer Default: 100 the number of executions to get, setting to 0 will return only totals |
| page | integer Default: 0 the page index to start at |
| status | string (ExecutionStatus) Enum: "queued" "running" "passed" "failed" "aborted" "timeout" "skipped" optional status filter containing multiple values separated by comma |
| startDate | string <date> startDate for filtering in ISO-8601 format, i.e. "yyyy-mm-dd" |
| endDate | string <date> endDate for filtering |
| selector | string Labels to filter by |
Responses
Response samples
- 200
- 404
- 500
{- "totals": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "filtered": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "results": [
- {
- "id": "62f395e004109209b50edfc4",
- "name": "test-suite1-test1",
- "number": 1,
- "testName": "test1",
- "testNamespace": "testkube",
- "testType": "postman/collection",
- "status": "queued",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "00:00:13",
- "durationMs": 10000,
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}
}
]
}Get test execution by ID
Returns execution with given executionID
path Parameters
| executionID required | string unique id of the object execution |
Responses
Response samples
- 200
- 404
- 500
- 502
{- "id": "62f395e004109209b50edfc4",
- "testName": "example-test",
- "testSuiteName": "test-suite1",
- "testNamespace": "testkube",
- "testType": "postman/collection",
- "name": "test-suite1-example-test-1",
- "number": 1,
- "envs": {
- "record": "true",
- "prefix": "some-"
}, - "command": [
- "curl"
], - "args": [
- "--concurrency",
- "2",
- "--remote",
- "--some",
- "blabla"
], - "args_mode": "append",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "testSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "testSuiteSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "content": {
- "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}, - "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "88s",
- "durationMs": 10000,
- "executionResult": {
- "status": "queued",
- "output": "string",
- "outputType": "text/plain",
- "errorMessage": "string",
- "steps": [
- {
- "name": "step1",
- "duration": "10m0s",
- "status": "passed",
- "assertionResults": [
- {
- "name": "assertion1",
- "status": "passed",
- "errorMessage": "string"
}
]
}
], - "reports": {
- "junit": "string"
}
}, - "labels": {
- "env": "prod",
- "app": "backend"
}, - "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "containerShell": "/bin/sh",
- "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}Get execution's logs by ID
Returns logs of the given executionID
path Parameters
| id required | string unique id of the object |
Responses
Response samples
- 200
- 500
[- {
- "type": "error",
- "content": "string",
- "result": {
- "status": "queued",
- "output": "string",
- "outputType": "text/plain",
- "errorMessage": "string",
- "steps": [
- {
- "name": "step1",
- "duration": "10m0s",
- "status": "passed",
- "assertionResults": [
- {
- "name": "assertion1",
- "status": "passed",
- "errorMessage": "string"
}
]
}
], - "reports": {
- "junit": "string"
}
}, - "time": "2018-03-20T09:12:28Z"
}
]Get execution's logs by ID version 2
Returns logs of the given executionID version 2
path Parameters
| id required | string unique id of the object |
Responses
Response samples
- 200
- 500
[- {
- "time": "2018-03-20T09:12:28Z",
- "content": "string",
- "type": "string",
- "source": "job-pod",
- "error": true,
- "version": "v1",
- "metadata": {
- "argsl": "passed command arguments"
}, - "v1": {
- "result": {
- "status": "queued",
- "output": "string",
- "outputType": "text/plain",
- "errorMessage": "string",
- "steps": [
- {
- "name": "step1",
- "duration": "10m0s",
- "status": "passed",
- "assertionResults": [
- {
- "name": "assertion1",
- "status": "passed",
- "errorMessage": "string"
}
]
}
], - "reports": {
- "junit": "string"
}
}
}
}
]Download artifact
Download the artifact file from the given execution
path Parameters
| id required | string unique id of the object |
| filename required | string filename of the object usually used for artifacts |
Responses
Response samples
- 404
- 500
[- {
- "title": "Invalid test name",
- "status": 500,
- "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
}
]Download artifact archive
Download the artifact archive from the given execution
path Parameters
| id required | string unique id of the object |
query Parameters
| mask | string mask to filter files |
Responses
Response samples
- 404
- 500
[- {
- "title": "Invalid test name",
- "status": 500,
- "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
}
]List tests
List available tests
query Parameters
| selector | string Labels to filter by |
| textSearch | string Default: "" text to search in name and test name |
Responses
Response samples
- 200
- 400
- 502
[- {
- "name": "test1",
- "namespace": "testkube",
- "description": "this test is used for that purpose",
- "type": "postman/collection",
- "content": {
- "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}, - "source": "my-private-repository-test",
- "created": "2022-07-30T06:54:15Z",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "schedule": "* * * * *",
- "readOnly": true,
- "uploads": [
- "settings/config.txt"
], - "executionRequest": {
- "id": "62f395e004109209b50edfc1",
- "name": "testing with 1000 users",
- "testSuiteName": "test-suite1",
- "number": 0,
- "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "namespace": "testkube",
- "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "testSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "testSuiteSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "args_mode": "append",
- "image": "kubeshop/testkube-executor-custom:1.10.11-dev-0a9c91",
- "imagePullSecrets": [
- {
- "name": "string"
}
], - "envs": {
- "record": "true",
- "prefix": "some-"
}, - "secretEnvs": {
- "secret_key_name1": "secret-name",
- "secret_Key_name2": "secret-name"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "negativeTest": false,
- "isNegativeTestChangedOnRun": false,
- "activeDeadlineSeconds": 1,
- "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "envConfigMaps": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "envSecrets": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}, - "status": {
- "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "number": 1,
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "status": "queued"
}
}
}
]Create new test
Create new test based on file content, uri or git based data
Request Body schema:
test details body
| name | string test name |
| namespace | string test namespace |
| description | string test description |
| type | string test type |
object (TestContent) | |
| source | string reference to test source resource |
| created | string <date-time> |
object test labels | |
| schedule | string schedule to run test |
| readOnly | boolean if test is offline and cannot be executed |
| uploads | Array of strings list of file paths that will be needed from uploads |
object (ExecutionRequest) test execution request body | |
object (TestStatus) test status |
Responses
Request samples
- Payload
{- "name": "test1",
- "namespace": "testkube",
- "description": "this test is used for that purpose",
- "type": "postman/collection",
- "content": {
- "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}, - "source": "my-private-repository-test",
- "created": "2022-07-30T06:54:15Z",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "schedule": "* * * * *",
- "readOnly": true,
- "uploads": [
- "settings/config.txt"
], - "executionRequest": {
- "id": "62f395e004109209b50edfc1",
- "name": "testing with 1000 users",
- "testSuiteName": "test-suite1",
- "number": 0,
- "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "namespace": "testkube",
- "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "args_mode": "append",
- "image": "kubeshop/testkube-executor-custom:1.10.11-dev-0a9c91",
- "imagePullSecrets": [
- {
- "name": "string"
}
], - "envs": {
- "record": "true",
- "prefix": "some-"
}, - "secretEnvs": {
- "secret_key_name1": "secret-name",
- "secret_Key_name2": "secret-name"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "negativeTest": false,
- "isNegativeTestChangedOnRun": false,
- "activeDeadlineSeconds": 1,
- "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "envConfigMaps": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "envSecrets": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}, - "status": {
- "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "number": 1,
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "status": "queued"
}
}
}Response samples
- 201
- 400
- 502
{- "name": "test1",
- "namespace": "testkube",
- "description": "this test is used for that purpose",
- "type": "postman/collection",
- "content": {
- "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}, - "source": "my-private-repository-test",
- "created": "2022-07-30T06:54:15Z",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "schedule": "* * * * *",
- "readOnly": true,
- "uploads": [
- "settings/config.txt"
], - "executionRequest": {
- "id": "62f395e004109209b50edfc1",
- "name": "testing with 1000 users",
- "testSuiteName": "test-suite1",
- "number": 0,
- "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "namespace": "testkube",
- "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "testSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "testSuiteSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "args_mode": "append",
- "image": "kubeshop/testkube-executor-custom:1.10.11-dev-0a9c91",
- "imagePullSecrets": [
- {
- "name": "string"
}
], - "envs": {
- "record": "true",
- "prefix": "some-"
}, - "secretEnvs": {
- "secret_key_name1": "secret-name",
- "secret_Key_name2": "secret-name"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "negativeTest": false,
- "isNegativeTestChangedOnRun": false,
- "activeDeadlineSeconds": 1,
- "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "envConfigMaps": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "envSecrets": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}, - "status": {
- "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "number": 1,
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "status": "queued"
}
}
}Update test
Update test based on test content or git based data
path Parameters
| id required | string unique id of the object |
Request Body schema:
test details body
| name | string test name |
| namespace | string test namespace |
| description | string test description |
| type | string test type |
object (TestContent) | |
| source | string reference to test source resource |
| created | string <date-time> |
object test labels | |
| schedule | string schedule to run test |
| readOnly | boolean if test is offline and cannot be executed |
| uploads | Array of strings list of file paths that will be needed from uploads |
object (ExecutionRequest) test execution request body | |
object (TestStatus) test status |
Responses
Request samples
- Payload
{- "name": "test1",
- "namespace": "testkube",
- "description": "this test is used for that purpose",
- "type": "postman/collection",
- "content": {
- "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}, - "source": "my-private-repository-test",
- "created": "2022-07-30T06:54:15Z",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "schedule": "* * * * *",
- "readOnly": true,
- "uploads": [
- "settings/config.txt"
], - "executionRequest": {
- "id": "62f395e004109209b50edfc1",
- "name": "testing with 1000 users",
- "testSuiteName": "test-suite1",
- "number": 0,
- "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "namespace": "testkube",
- "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "args_mode": "append",
- "image": "kubeshop/testkube-executor-custom:1.10.11-dev-0a9c91",
- "imagePullSecrets": [
- {
- "name": "string"
}
], - "envs": {
- "record": "true",
- "prefix": "some-"
}, - "secretEnvs": {
- "secret_key_name1": "secret-name",
- "secret_Key_name2": "secret-name"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "negativeTest": false,
- "isNegativeTestChangedOnRun": false,
- "activeDeadlineSeconds": 1,
- "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "envConfigMaps": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "envSecrets": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}, - "status": {
- "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "number": 1,
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "status": "queued"
}
}
}Response samples
- 200
- 400
- 404
- 502
{- "name": "test1",
- "namespace": "testkube",
- "description": "this test is used for that purpose",
- "type": "postman/collection",
- "content": {
- "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}, - "source": "my-private-repository-test",
- "created": "2022-07-30T06:54:15Z",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "schedule": "* * * * *",
- "readOnly": true,
- "uploads": [
- "settings/config.txt"
], - "executionRequest": {
- "id": "62f395e004109209b50edfc1",
- "name": "testing with 1000 users",
- "testSuiteName": "test-suite1",
- "number": 0,
- "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "namespace": "testkube",
- "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "testSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "testSuiteSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "args_mode": "append",
- "image": "kubeshop/testkube-executor-custom:1.10.11-dev-0a9c91",
- "imagePullSecrets": [
- {
- "name": "string"
}
], - "envs": {
- "record": "true",
- "prefix": "some-"
}, - "secretEnvs": {
- "secret_key_name1": "secret-name",
- "secret_Key_name2": "secret-name"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "negativeTest": false,
- "isNegativeTestChangedOnRun": false,
- "activeDeadlineSeconds": 1,
- "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "envConfigMaps": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "envSecrets": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}, - "status": {
- "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "number": 1,
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "status": "queued"
}
}
}Response samples
- 200
- 400
- 404
- 502
{- "name": "test1",
- "namespace": "testkube",
- "description": "this test is used for that purpose",
- "type": "postman/collection",
- "content": {
- "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}, - "source": "my-private-repository-test",
- "created": "2022-07-30T06:54:15Z",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "schedule": "* * * * *",
- "readOnly": true,
- "uploads": [
- "settings/config.txt"
], - "executionRequest": {
- "id": "62f395e004109209b50edfc1",
- "name": "testing with 1000 users",
- "testSuiteName": "test-suite1",
- "number": 0,
- "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "namespace": "testkube",
- "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "testSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "testSuiteSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "args_mode": "append",
- "image": "kubeshop/testkube-executor-custom:1.10.11-dev-0a9c91",
- "imagePullSecrets": [
- {
- "name": "string"
}
], - "envs": {
- "record": "true",
- "prefix": "some-"
}, - "secretEnvs": {
- "secret_key_name1": "secret-name",
- "secret_Key_name2": "secret-name"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "negativeTest": false,
- "isNegativeTestChangedOnRun": false,
- "activeDeadlineSeconds": 1,
- "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "envConfigMaps": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "envSecrets": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}, - "status": {
- "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "number": 1,
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "status": "queued"
}
}
}Delete test
Deletes a test
path Parameters
| id required | string unique id of the object |
query Parameters
| skipDeleteExecutions | boolean Default: false dont delete executions |
Responses
Response samples
- 404
- 500
- 502
[- {
- "title": "Invalid test name",
- "status": 500,
- "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
}
]Abort all executions of a test
Abort all test executions
path Parameters
| id required | string unique id of the object |
Responses
Response samples
- 404
- 500
- 502
[- {
- "title": "Invalid test name",
- "status": 500,
- "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
}
]Get test metrics
Gets test metrics for given tests executions, with particular execution status and timings
path Parameters
| id required | string unique id of the object |
query Parameters
| last | integer Default: 7 last N days to show |
| limit | integer Default: 7 limit records count same as pageSize |
Responses
Response samples
- 200
- 500
- 502
{- "passFailRatio": 50,
- "executionDurationP50": "7m2.71s",
- "executionDurationP50ms": 422,
- "executionDurationP90": "7m2.71s",
- "executionDurationP90ms": 422,
- "executionDurationP95": "7m2.71s",
- "executionDurationP95ms": 422,
- "executionDurationP99": "7m2.71s",
- "executionDurationP99ms": 422,
- "totalExecutions": 2,
- "failedExecutions": 1,
- "executions": [
- {
- "executionId": "string",
- "duration": "string",
- "durationMs": 0,
- "status": "string",
- "name": "string",
- "startTime": "2019-08-24T14:15:22Z"
}
]
}List test with executions
List available test with executions
query Parameters
| selector | string Labels to filter by |
| textSearch | string Default: "" text to search in name and test name |
| status | string (ExecutionStatus) Enum: "queued" "running" "passed" "failed" "aborted" "timeout" "skipped" optional status filter containing multiple values separated by comma |
| pageSize | integer Default: 100 the number of executions to get, setting to 0 will return only totals |
| page | integer Default: 0 the page index to start at |
Responses
Response samples
- 200
- 400
- 500
- 502
[- {
- "test": {
- "name": "test1",
- "namespace": "testkube",
- "description": "this test is used for that purpose",
- "type": "postman/collection",
- "content": {
- "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}, - "source": "my-private-repository-test",
- "created": "2022-07-30T06:54:15Z",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "schedule": "* * * * *",
- "readOnly": true,
- "uploads": [
- "settings/config.txt"
], - "executionRequest": {
- "id": "62f395e004109209b50edfc1",
- "name": "testing with 1000 users",
- "testSuiteName": "test-suite1",
- "number": 0,
- "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "namespace": "testkube",
- "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "testSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "testSuiteSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "args_mode": "append",
- "image": "kubeshop/testkube-executor-custom:1.10.11-dev-0a9c91",
- "imagePullSecrets": [
- {
- "name": "string"
}
], - "envs": {
- "record": "true",
- "prefix": "some-"
}, - "secretEnvs": {
- "secret_key_name1": "secret-name",
- "secret_Key_name2": "secret-name"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "negativeTest": false,
- "isNegativeTestChangedOnRun": false,
- "activeDeadlineSeconds": 1,
- "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "envConfigMaps": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "envSecrets": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}, - "status": {
- "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "number": 1,
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "status": "queued"
}
}
}, - "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "name": "test-suite1-test1",
- "number": 1,
- "testName": "test1",
- "testNamespace": "testkube",
- "testType": "postman/collection",
- "status": "queued",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "00:00:13",
- "durationMs": 10000,
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}
}
}
]Get test with execution
Gets the specified test with execution
path Parameters
| id required | string unique id of the object |
Responses
Response samples
- 200
- 400
- 404
- 500
- 502
{- "test": {
- "name": "test1",
- "namespace": "testkube",
- "description": "this test is used for that purpose",
- "type": "postman/collection",
- "content": {
- "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}, - "source": "my-private-repository-test",
- "created": "2022-07-30T06:54:15Z",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "schedule": "* * * * *",
- "readOnly": true,
- "uploads": [
- "settings/config.txt"
], - "executionRequest": {
- "id": "62f395e004109209b50edfc1",
- "name": "testing with 1000 users",
- "testSuiteName": "test-suite1",
- "number": 0,
- "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "namespace": "testkube",
- "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "testSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "testSuiteSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "args_mode": "append",
- "image": "kubeshop/testkube-executor-custom:1.10.11-dev-0a9c91",
- "imagePullSecrets": [
- {
- "name": "string"
}
], - "envs": {
- "record": "true",
- "prefix": "some-"
}, - "secretEnvs": {
- "secret_key_name1": "secret-name",
- "secret_Key_name2": "secret-name"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "negativeTest": false,
- "isNegativeTestChangedOnRun": false,
- "activeDeadlineSeconds": 1,
- "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "envConfigMaps": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "envSecrets": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}, - "status": {
- "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "number": 1,
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "status": "queued"
}
}
}, - "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "testName": "example-test",
- "testSuiteName": "test-suite1",
- "testNamespace": "testkube",
- "testType": "postman/collection",
- "name": "test-suite1-example-test-1",
- "number": 1,
- "envs": {
- "record": "true",
- "prefix": "some-"
}, - "command": [
- "curl"
], - "args": [
- "--concurrency",
- "2",
- "--remote",
- "--some",
- "blabla"
], - "args_mode": "append",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "testSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "testSuiteSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "content": {
- "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}, - "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "88s",
- "durationMs": 10000,
- "executionResult": {
- "status": "queued",
- "output": "string",
- "outputType": "text/plain",
- "errorMessage": "string",
- "steps": [
- {
- "name": "step1",
- "duration": "10m0s",
- "status": "passed",
- "assertionResults": [
- {
- "name": "assertion1",
- "status": "passed",
- "errorMessage": "string"
}
]
}
], - "reports": {
- "junit": "string"
}
}, - "labels": {
- "env": "prod",
- "app": "backend"
}, - "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "containerShell": "/bin/sh",
- "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}
}Starts new test execution
New test execution returns new execution details on successful execution start
path Parameters
| id required | string unique id of the object |
query Parameters
| namespace | string Default: "testkube" Namespace of the object |
| testExecutionName | string test execution name stated the test execution |
Request Body schema: application/json
body passed to configure execution
| id | string <bson objectId> execution id |
| name | string test execution custom name |
| testSuiteName | string unique test suite name (CRD Test suite name), if it's run as a part of test suite |
| number | integer test execution number |
object test execution labels | |
| namespace | string test kubernetes namespace ("testkube" when not set) |
| isVariablesFileUploaded | boolean in case the variables file is too big, it will be uploaded |
| variablesFile | string variables file content - need to be in format for particular executor (e.g. postman envs file) |
object (Variables) execution variables passed to executor converted to vars for usage in tests | |
| command | Array of strings executor image command |
| args | Array of strings additional executor binary arguments |
| args_mode | string Enum: "append" "override" "replace" usage mode for arguments |
| image | string container image, executor will run inside this image |
Array of objects (LocalObjectReference) container image pull secrets | |
object Deprecated Environment variables passed to executor. Deprecated: use Basic Variables instead | |
object Deprecated Execution variables passed to executor from secrets. Deprecated: use Secret Variables instead | |
| sync | boolean whether to start execution sync or async |
| httpProxy | string http proxy for executor containers |
| httpsProxy | string https proxy for executor containers |
| negativeTest | boolean whether to run test as negative test |
| isNegativeTestChangedOnRun | boolean whether negativeTest was changed by user |
| activeDeadlineSeconds | integer <int64> duration in seconds the test may be active, until its stopped |
| uploads | Array of strings list of file paths that need to be copied into the test from uploads |
| bucketName | string minio bucket name to get uploads from |
object (ArtifactRequest) artifact request body with test artifacts | |
| jobTemplate | string job template extensions |
| jobTemplateReference | string name of the template resource |
| cronJobTemplate | string cron job template extensions |
| cronJobTemplateReference | string name of the template resource |
object (TestContentRequest) test content request body | |
| preRunScript | string script to run before test execution |
| postRunScript | string script to run after test execution |
| executePostRunScriptBeforeScraping | boolean execute post run script before scraping (prebuilt executor only) |
| sourceScripts | boolean run scripts using source command (container executor only) |
| scraperTemplate | string scraper template extensions |
| scraperTemplateReference | string name of the template resource |
| pvcTemplate | string pvc template extensions |
| pvcTemplateReference | string name of the template resource |
Array of objects (EnvReference) config map references | |
Array of objects (EnvReference) secret references | |
object (RunningContext) running context for test or test suite execution | |
| testExecutionName | string test execution name started the test execution |
| downloadArtifactExecutionIDs | Array of strings execution ids for artifacts to download |
| downloadArtifactTestNames | Array of strings test names for artifacts to download from latest executions |
object (PodRequest) pod request body | |
| executionNamespace | string namespace for test execution (Pro edition only) |
Responses
Request samples
- Payload
{- "id": "62f395e004109209b50edfc1",
- "name": "testing with 1000 users",
- "testSuiteName": "test-suite1",
- "number": 0,
- "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "namespace": "testkube",
- "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "args_mode": "append",
- "image": "kubeshop/testkube-executor-custom:1.10.11-dev-0a9c91",
- "imagePullSecrets": [
- {
- "name": "string"
}
], - "envs": {
- "record": "true",
- "prefix": "some-"
}, - "secretEnvs": {
- "secret_key_name1": "secret-name",
- "secret_Key_name2": "secret-name"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "negativeTest": false,
- "isNegativeTestChangedOnRun": false,
- "activeDeadlineSeconds": 1,
- "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "envConfigMaps": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "envSecrets": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}Response samples
- 201
- 400
- 404
- 500
- 502
{- "status": "queued",
- "output": "string",
- "outputType": "text/plain",
- "errorMessage": "string",
- "steps": [
- {
- "name": "step1",
- "duration": "10m0s",
- "status": "passed",
- "assertionResults": [
- {
- "name": "assertion1",
- "status": "passed",
- "errorMessage": "string"
}
]
}
], - "reports": {
- "junit": "string"
}
}Get all test executions
Returns array of all available test executions
path Parameters
| id required | string unique id of the object |
query Parameters
| last | integer Default: 7 last N days to show |
| pageSize | integer Default: 100 the number of executions to get, setting to 0 will return only totals |
| page | integer Default: 0 the page index to start at |
| status | string (ExecutionStatus) Enum: "queued" "running" "passed" "failed" "aborted" "timeout" "skipped" optional status filter containing multiple values separated by comma |
| startDate | string <date> startDate for filtering in ISO-8601 format, i.e. "yyyy-mm-dd" |
| endDate | string <date> endDate for filtering |
Responses
Response samples
- 200
- 404
- 500
{- "totals": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "filtered": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "results": [
- {
- "id": "62f395e004109209b50edfc4",
- "name": "test-suite1-test1",
- "number": 1,
- "testName": "test1",
- "testNamespace": "testkube",
- "testType": "postman/collection",
- "status": "queued",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "00:00:13",
- "durationMs": 10000,
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}
}
]
}Get test execution
Returns execution with given executionID
path Parameters
| id required | string unique id of the object |
| executionID required | string unique id of the object execution |
Responses
Response samples
- 200
- 404
- 500
- 502
{- "id": "62f395e004109209b50edfc4",
- "testName": "example-test",
- "testSuiteName": "test-suite1",
- "testNamespace": "testkube",
- "testType": "postman/collection",
- "name": "test-suite1-example-test-1",
- "number": 1,
- "envs": {
- "record": "true",
- "prefix": "some-"
}, - "command": [
- "curl"
], - "args": [
- "--concurrency",
- "2",
- "--remote",
- "--some",
- "blabla"
], - "args_mode": "append",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "testSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "testSuiteSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "content": {
- "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}, - "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "88s",
- "durationMs": 10000,
- "executionResult": {
- "status": "queued",
- "output": "string",
- "outputType": "text/plain",
- "errorMessage": "string",
- "steps": [
- {
- "name": "step1",
- "duration": "10m0s",
- "status": "passed",
- "assertionResults": [
- {
- "name": "assertion1",
- "status": "passed",
- "errorMessage": "string"
}
]
}
], - "reports": {
- "junit": "string"
}
}, - "labels": {
- "env": "prod",
- "app": "backend"
}, - "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "containerShell": "/bin/sh",
- "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}Aborts execution
Aborts execution with given executionID
path Parameters
| id required | string unique id of the object |
| executionID required | string unique id of the object execution |
Responses
Response samples
- 502
[- {
- "title": "Invalid test name",
- "status": 500,
- "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
}
]List executors
List executors available in cluster
query Parameters
| selector | string Labels to filter by |
Responses
Response samples
- 200
- 400
- 502
[- {
- "executorType": "string",
- "image": "string",
- "slaves": {
- "image": "kubeshop/ex-slaves-image:latest"
}, - "imagePullSecrets": [
- {
- "name": "string"
}
], - "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "types": [
- "string"
], - "uri": "string",
- "contentTypes": [
- "string"
], - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "features": [
- "artifacts"
], - "meta": {
- "iconURI": "/assets/k6.jpg",
- "tooltips": {
- "general": "please provide k6 test script for execution"
}
}, - "useDataDirAsWorkingDir": true
}
]Create new executor
Create new executor based on variables passed in request
Request Body schema:
executor request body data
| executorType | string ExecutorType one of "rest" for rest openapi based executors or "job" which will be default runners for testkube soon |
| image | string Image for kube-job |
object (SlavesMeta) Slave data for executing tests in distributed environment | |
Array of objects (LocalObjectReference) container image pull secrets | |
| command | Array of strings executor image command |
| args | Array of strings additional executor binary argument |
| types required | Array of strings Types defines what types can be handled by executor e.g. "postman/collection", ":curl/command" etc |
| uri | string URI for rest based executors |
| contentTypes | Array of strings list of handled content types |
| jobTemplate | string Job template to launch executor |
| jobTemplateReference | string name of the template resource |
object executor labels | |
| features | Array of strings Items Enum: "artifacts" "junit-report" Available executor features |
object (ExecutorMeta) Executor meta data | |
| useDataDirAsWorkingDir | boolean use data dir as working dir for executor |
| namespace required | string object kubernetes namespace |
| name required | string object name |
Responses
Request samples
- Payload
{- "executorType": "string",
- "image": "string",
- "slaves": {
- "image": "kubeshop/ex-slaves-image:latest"
}, - "imagePullSecrets": [
- {
- "name": "string"
}
], - "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "types": [
- "string"
], - "uri": "string",
- "contentTypes": [
- "string"
], - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "features": [
- "artifacts"
], - "meta": {
- "iconURI": "/assets/k6.jpg",
- "tooltips": {
- "general": "please provide k6 test script for execution"
}
}, - "useDataDirAsWorkingDir": true,
- "namespace": "testkube",
- "name": "name"
}Response samples
- 201
- 400
- 502
{- "name": "string",
- "executor": {
- "executorType": "string",
- "image": "string",
- "slaves": {
- "image": "kubeshop/ex-slaves-image:latest"
}, - "imagePullSecrets": [
- {
- "name": "string"
}
], - "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "types": [
- "string"
], - "uri": "string",
- "contentTypes": [
- "string"
], - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "features": [
- "artifacts"
], - "meta": {
- "iconURI": "/assets/k6.jpg",
- "tooltips": {
- "general": "please provide k6 test script for execution"
}
}, - "useDataDirAsWorkingDir": true
}, - "executions": {
- "totals": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "filtered": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "results": [
- {
- "id": "62f395e004109209b50edfc4",
- "name": "test-suite1-test1",
- "number": 1,
- "testName": "test1",
- "testNamespace": "testkube",
- "testType": "postman/collection",
- "status": "queued",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "00:00:13",
- "durationMs": 10000,
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}
}
]
}
}Get executor details
Returns executors data with executions passed to executor
path Parameters
| id required | string unique id of the object |
Responses
Response samples
- 200
- 400
- 500
- 502
{- "name": "string",
- "executor": {
- "executorType": "string",
- "image": "string",
- "slaves": {
- "image": "kubeshop/ex-slaves-image:latest"
}, - "imagePullSecrets": [
- {
- "name": "string"
}
], - "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "types": [
- "string"
], - "uri": "string",
- "contentTypes": [
- "string"
], - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "features": [
- "artifacts"
], - "meta": {
- "iconURI": "/assets/k6.jpg",
- "tooltips": {
- "general": "please provide k6 test script for execution"
}
}, - "useDataDirAsWorkingDir": true
}, - "executions": {
- "totals": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "filtered": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "results": [
- {
- "id": "62f395e004109209b50edfc4",
- "name": "test-suite1-test1",
- "number": 1,
- "testName": "test1",
- "testNamespace": "testkube",
- "testType": "postman/collection",
- "status": "queued",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "00:00:13",
- "durationMs": 10000,
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}
}
]
}
}Update executor
Update new executor based on variables passed in request
path Parameters
| id required | string unique id of the object |
Request Body schema:
executor request body data
| executorType | string ExecutorType one of "rest" for rest openapi based executors or "job" which will be default runners for testkube soon |
| image | string Image for kube-job |
object (SlavesMeta) Slave data for executing tests in distributed environment | |
Array of objects (LocalObjectReference) container image pull secrets | |
| command | Array of strings executor image command |
| args | Array of strings additional executor binary argument |
| types | Array of strings Types defines what types can be handled by executor e.g. "postman/collection", ":curl/command" etc |
| uri | string URI for rest based executors |
| contentTypes | Array of strings list of handled content types |
| jobTemplate | string Job template to launch executor |
| jobTemplateReference | string name of the template resource |
object executor labels | |
| features | Array of strings Items Enum: "artifacts" "junit-report" Available executor features |
object (ExecutorMeta) Executor meta data | |
| useDataDirAsWorkingDir | boolean use data dir as working dir for executor |
| namespace | string object kubernetes namespace |
| name required | string object name |
Responses
Request samples
- Payload
{- "executorType": "string",
- "image": "string",
- "slaves": {
- "image": "kubeshop/ex-slaves-image:latest"
}, - "imagePullSecrets": [
- {
- "name": "string"
}
], - "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "types": [
- "string"
], - "uri": "string",
- "contentTypes": [
- "string"
], - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "features": [
- "artifacts"
], - "meta": {
- "iconURI": "/assets/k6.jpg",
- "tooltips": {
- "general": "please provide k6 test script for execution"
}
}, - "useDataDirAsWorkingDir": true,
- "namespace": "testkube",
- "name": "name"
}Response samples
- 200
- 400
- 404
- 502
{- "name": "string",
- "executor": {
- "executorType": "string",
- "image": "string",
- "slaves": {
- "image": "kubeshop/ex-slaves-image:latest"
}, - "imagePullSecrets": [
- {
- "name": "string"
}
], - "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "types": [
- "string"
], - "uri": "string",
- "contentTypes": [
- "string"
], - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "features": [
- "artifacts"
], - "meta": {
- "iconURI": "/assets/k6.jpg",
- "tooltips": {
- "general": "please provide k6 test script for execution"
}
}, - "useDataDirAsWorkingDir": true
}, - "executions": {
- "totals": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "filtered": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "results": [
- {
- "id": "62f395e004109209b50edfc4",
- "name": "test-suite1-test1",
- "number": 1,
- "testName": "test1",
- "testNamespace": "testkube",
- "testType": "postman/collection",
- "status": "queued",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "00:00:13",
- "durationMs": 10000,
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}
}
]
}
}Get executor details by type
Returns executors data with executions passed to executor
query Parameters
| testType required | string test type of the executor |
Responses
Response samples
- 200
- 400
- 500
- 502
{- "name": "string",
- "executor": {
- "executorType": "string",
- "image": "string",
- "slaves": {
- "image": "kubeshop/ex-slaves-image:latest"
}, - "imagePullSecrets": [
- {
- "name": "string"
}
], - "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "types": [
- "string"
], - "uri": "string",
- "contentTypes": [
- "string"
], - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "features": [
- "artifacts"
], - "meta": {
- "iconURI": "/assets/k6.jpg",
- "tooltips": {
- "general": "please provide k6 test script for execution"
}
}, - "useDataDirAsWorkingDir": true
}, - "executions": {
- "totals": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "filtered": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "results": [
- {
- "id": "62f395e004109209b50edfc4",
- "name": "test-suite1-test1",
- "number": 1,
- "testName": "test1",
- "testNamespace": "testkube",
- "testType": "postman/collection",
- "status": "queued",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "00:00:13",
- "durationMs": 10000,
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}
}
]
}
}List webhooks
List webhooks available in cluster
query Parameters
| selector | string Labels to filter by |
Responses
Response samples
- 200
- 400
- 502
[- {
- "name": "webhook1",
- "namespace": "testkube",
- "events": [
- "start-test"
], - "selector": "string",
- "payloadObjectField": "string",
- "payloadTemplate": "string",
- "payloadTemplateReference": "string",
- "headers": {
- "Content-Type": "application/xml"
}, - "labels": {
- "env": "prod",
- "app": "backend"
}
}
]Create new webhook
Create new webhook based on variables passed in request
Request Body schema:
webhook request body data
| name | string |
| namespace | string |
| uri required | string |
| events required | Array of strings (EventType) Items Enum: "start-test" "end-test-success" "end-test-failed" "end-test-aborted" "end-test-timeout" "start-testsuite" "end-testsuite-success" "end-testsuite-failed" "end-testsuite-aborted" "end-testsuite-timeout" "created" "updated" "deleted" |
| selector | string Labels to filter for tests and test suites |
| payloadObjectField | string will load the generated payload for notification inside the object |
| payloadTemplate | string golang based template for notification payload |
| payloadTemplateReference | string name of the template resource |
object webhook headers (golang template supported) | |
object webhook labels |
Responses
Request samples
- Payload
{- "name": "webhook1",
- "namespace": "testkube",
- "events": [
- "start-test"
], - "selector": "string",
- "payloadObjectField": "string",
- "payloadTemplate": "string",
- "payloadTemplateReference": "string",
- "headers": {
- "Content-Type": "application/xml"
}, - "labels": {
- "env": "prod",
- "app": "backend"
}
}Response samples
- 201
- 400
- 502
{- "name": "webhook1",
- "namespace": "testkube",
- "events": [
- "start-test"
], - "selector": "string",
- "payloadObjectField": "string",
- "payloadTemplate": "string",
- "payloadTemplateReference": "string",
- "headers": {
- "Content-Type": "application/xml"
}, - "labels": {
- "env": "prod",
- "app": "backend"
}
}Get webhook details
Returns webhook
path Parameters
| id required | string unique id of the object |
Responses
Response samples
- 200
- 400
- 404
- 500
- 502
{- "name": "webhook1",
- "namespace": "testkube",
- "events": [
- "start-test"
], - "selector": "string",
- "payloadObjectField": "string",
- "payloadTemplate": "string",
- "payloadTemplateReference": "string",
- "headers": {
- "Content-Type": "application/xml"
}, - "labels": {
- "env": "prod",
- "app": "backend"
}
}Update new webhook
Update new webhook based on variables passed in request
path Parameters
| id required | string unique id of the object |
Request Body schema:
webhook request body data
| name | string |
| namespace | string |
| uri required | string |
| events required | Array of strings (EventType) Items Enum: "start-test" "end-test-success" "end-test-failed" "end-test-aborted" "end-test-timeout" "start-testsuite" "end-testsuite-success" "end-testsuite-failed" "end-testsuite-aborted" "end-testsuite-timeout" "created" "updated" "deleted" |
| selector | string Labels to filter for tests and test suites |
| payloadObjectField | string will load the generated payload for notification inside the object |
| payloadTemplate | string golang based template for notification payload |
| payloadTemplateReference | string name of the template resource |
object webhook headers (golang template supported) | |
object webhook labels |
Responses
Request samples
- Payload
{- "name": "webhook1",
- "namespace": "testkube",
- "events": [
- "start-test"
], - "selector": "string",
- "payloadObjectField": "string",
- "payloadTemplate": "string",
- "payloadTemplateReference": "string",
- "headers": {
- "Content-Type": "application/xml"
}, - "labels": {
- "env": "prod",
- "app": "backend"
}
}Response samples
- 200
- 400
- 404
- 502
{- "name": "webhook1",
- "namespace": "testkube",
- "events": [
- "start-test"
], - "selector": "string",
- "payloadObjectField": "string",
- "payloadTemplate": "string",
- "payloadTemplateReference": "string",
- "headers": {
- "Content-Type": "application/xml"
}, - "labels": {
- "env": "prod",
- "app": "backend"
}
}Create new template
Create new template based on variables passed in request
Request Body schema:
template request body data
| name required | string template name for reference |
| namespace | string template namespace |
| type required | string (TemplateType) Enum: "job" "container" "cronjob" "scraper" "pvc" "webhook" "pod" template type by purpose |
| body required | string template body to use |
object template labels |
Responses
Request samples
- Payload
{- "name": "webhook-template",
- "namespace": "testkube",
- "type": "job",
- "body": "{\"id\": \"{{ .Id }}\"}",
- "labels": {
- "env": "prod",
- "app": "backend"
}
}Response samples
- 201
- 400
- 502
{- "name": "webhook-template",
- "namespace": "testkube",
- "type": "job",
- "body": "{\"id\": \"{{ .Id }}\"}",
- "labels": {
- "env": "prod",
- "app": "backend"
}
}Update new template
Update new template based on variables passed in request
path Parameters
| id required | string unique id of the object |
Request Body schema:
template request body data
| name required | string template name for reference |
| namespace | string template namespace |
| type required | string (TemplateType) Enum: "job" "container" "cronjob" "scraper" "pvc" "webhook" "pod" template type by purpose |
| body required | string template body to use |
object template labels |
Responses
Request samples
- Payload
{- "name": "webhook-template",
- "namespace": "testkube",
- "type": "job",
- "body": "{\"id\": \"{{ .Id }}\"}",
- "labels": {
- "env": "prod",
- "app": "backend"
}
}Response samples
- 200
- 400
- 404
- 502
{- "name": "webhook-template",
- "namespace": "testkube",
- "type": "job",
- "body": "{\"id\": \"{{ .Id }}\"}",
- "labels": {
- "env": "prod",
- "app": "backend"
}
}Update config
Updates config in cluster storage state
Request Body schema: application/json
config request body data
| id required | string |
| clusterId required | string |
| enableTelemetry required | boolean |
Responses
Request samples
- Payload
{- "id": "string",
- "clusterId": "string",
- "enableTelemetry": true
}Response samples
- 200
- 400
- 404
- 500
{- "id": "string",
- "clusterId": "string",
- "enableTelemetry": true
}Get debug information
Gets information that is needed for debugging and opening Testkube bug reports
Responses
Response samples
- 200
- 500
- 502
{- "clientVersion": "1.4.9",
- "serverVersion": "v1.4.9",
- "clusterVersion": "v1.23.4",
- "apiLogs": [
- "logline1",
- "logline2",
- "logline3"
], - "operatorLogs": [
- "logline1",
- "logline2",
- "logline3"
], - "executionLogs": {
- "property1": [
- "logline1",
- "logline2",
- "logline3"
], - "property2": [
- "logline1",
- "logline2",
- "logline3"
]
}
}List test sources
List test sources available in cluster
query Parameters
| selector | string Labels to filter by |
Responses
Response samples
- 200
- 400
- 502
[- {
- "name": "testsource1",
- "namespace": "testkube",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}
]Create new test source
Create new test source based on variables passed in request
Request Body schema:
test source request body data
| name | string test source name |
| namespace | string test source namespace |
object test source labels | |
| type | string Enum: "string" "file-uri" "git-file" "git-dir" "git" type of sources a runner can get data from. string: String content (e.g. Postman JSON file). file-uri: content stored on the webserver. git-file: the file stored in the Git repo in the given repository.path field (Deprecated: use git instead). git-dir: the entire git repo or git subdirectory depending on the repository.path field (Testkube does a shadow clone and sparse checkout to limit IOs in the case of monorepos). (Deprecated: use git instead). git: automatically provisions either a file, directory or whole git repository depending on the repository.path field. |
object (Repository) repository representation for tests in git repositories | |
| data | string test content data as string |
| uri | string test content |
Responses
Request samples
- Payload
{- "name": "testsource1",
- "namespace": "testkube",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}Response samples
- 201
- 400
- 502
{- "name": "testsource1",
- "namespace": "testkube",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}Process test source batch (create, update, delete)
Process test source batch based on variables passed in request
Request Body schema: application/json
test source batch request body data
required | Array of objects (TestSourceUpsertRequest) | ||||||||||||||
Array
| |||||||||||||||
Responses
Request samples
- Payload
{- "batch": [
- {
- "name": "testsource1",
- "namespace": "testkube",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}
]
}Response samples
- 200
- 400
- 502
{- "created": [
- "name1",
- "name2",
- "name3"
], - "updated": [
- "name4",
- "name5",
- "name6"
], - "deleted": [
- "name7",
- "name8",
- "name9"
]
}Update test source
Update test source based on test content or git based data
path Parameters
| id required | string unique id of the object |
Request Body schema:
test source body
| name | string test source name |
| namespace | string test source namespace |
object test source labels | |
| type | string Enum: "string" "file-uri" "git-file" "git-dir" "git" type of sources a runner can get data from. string: String content (e.g. Postman JSON file). file-uri: content stored on the webserver. git-file: the file stored in the Git repo in the given repository.path field (Deprecated: use git instead). git-dir: the entire git repo or git subdirectory depending on the repository.path field (Testkube does a shadow clone and sparse checkout to limit IOs in the case of monorepos). (Deprecated: use git instead). git: automatically provisions either a file, directory or whole git repository depending on the repository.path field. |
object (Repository) repository representation for tests in git repositories | |
| data | string test content data as string |
| uri | string test content |
Responses
Request samples
- Payload
{- "name": "testsource1",
- "namespace": "testkube",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}Response samples
- 200
- 400
- 404
- 502
{- "name": "testsource1",
- "namespace": "testkube",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}Delete test source
Deletes test source by its name
path Parameters
| id required | string unique id of the object |
Responses
Response samples
- 502
[- {
- "title": "Invalid test name",
- "status": 500,
- "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
}
]Get test source data
Returns test sources data
path Parameters
| id required | string unique id of the object |
Responses
Response samples
- 200
- 400
- 404
- 500
- 502
{- "name": "testsource1",
- "namespace": "testkube",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}Validate new repository
Validate new repository based on variables passed in request
Request Body schema: application/json
repository request body data
| type required | string Value: "git" VCS repository type |
| uri required | string uri of content file or git directory |
| branch | string branch/tag name for checkout |
| commit | string commit id (sha) for checkout |
| path | string if needed we can checkout particular path (dir or file) in case of BIG/mono repositories |
| username | string git auth username for private repositories |
| token | string git auth token for private repositories |
object (SecretRef) Testkube internal reference for secret storage in Kubernetes secrets | |
object (SecretRef) Testkube internal reference for secret storage in Kubernetes secrets | |
| certificateSecret | string secret with certificate for private repositories. Should contain one key ending with .crt such as "mycorp.crt", whose value is the certificate file content, suitable for git config http.sslCAInfo |
| workingDir | string if provided we checkout the whole repository and run test from this directory |
| authType | string Enum: "basic" "header" auth type for git requests |
Responses
Request samples
- Payload
{- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}Response samples
- 400
- 500
- 502
[- {
- "title": "Invalid test name",
- "status": 500,
- "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
}
]Get test suite metrics
Gets test suite metrics for given tests executions, with particular execution status and timings
path Parameters
| id required | string unique id of the object |
query Parameters
| last | integer Default: 7 last N days to show |
| limit | integer Default: 7 limit records count same as pageSize |
Responses
Response samples
- 200
- 500
{- "passFailRatio": 50,
- "executionDurationP50": "7m2.71s",
- "executionDurationP50ms": 422,
- "executionDurationP90": "7m2.71s",
- "executionDurationP90ms": 422,
- "executionDurationP95": "7m2.71s",
- "executionDurationP95ms": 422,
- "executionDurationP99": "7m2.71s",
- "executionDurationP99ms": 422,
- "totalExecutions": 2,
- "failedExecutions": 1,
- "executions": [
- {
- "executionId": "string",
- "duration": "string",
- "durationMs": 0,
- "status": "string",
- "name": "string",
- "startTime": "2019-08-24T14:15:22Z"
}
]
}Starts new test executions
New test executions returns new executions details on successful executions start
query Parameters
| namespace | string Default: "testkube" Namespace of the object |
| selector | string Labels to filter by |
| executionSelector | string Execution Labels to add to executions |
| concurrency | integer Default: 10 |
Request Body schema: application/json
body passed to configure executions
| id | string <bson objectId> execution id |
| name | string test execution custom name |
| testSuiteName | string unique test suite name (CRD Test suite name), if it's run as a part of test suite |
| number | integer test execution number |
object test execution labels | |
| namespace | string test kubernetes namespace ("testkube" when not set) |
| isVariablesFileUploaded | boolean in case the variables file is too big, it will be uploaded |
| variablesFile | string variables file content - need to be in format for particular executor (e.g. postman envs file) |
object (Variables) execution variables passed to executor converted to vars for usage in tests | |
| command | Array of strings executor image command |
| args | Array of strings additional executor binary arguments |
| args_mode | string Enum: "append" "override" "replace" usage mode for arguments |
| image | string container image, executor will run inside this image |
Array of objects (LocalObjectReference) container image pull secrets | |
object Deprecated Environment variables passed to executor. Deprecated: use Basic Variables instead | |
object Deprecated Execution variables passed to executor from secrets. Deprecated: use Secret Variables instead | |
| sync | boolean whether to start execution sync or async |
| httpProxy | string http proxy for executor containers |
| httpsProxy | string https proxy for executor containers |
| negativeTest | boolean whether to run test as negative test |
| isNegativeTestChangedOnRun | boolean whether negativeTest was changed by user |
| activeDeadlineSeconds | integer <int64> duration in seconds the test may be active, until its stopped |
| uploads | Array of strings list of file paths that need to be copied into the test from uploads |
| bucketName | string minio bucket name to get uploads from |
object (ArtifactRequest) artifact request body with test artifacts | |
| jobTemplate | string job template extensions |
| jobTemplateReference | string name of the template resource |
| cronJobTemplate | string cron job template extensions |
| cronJobTemplateReference | string name of the template resource |
object (TestContentRequest) test content request body | |
| preRunScript | string script to run before test execution |
| postRunScript | string script to run after test execution |
| executePostRunScriptBeforeScraping | boolean execute post run script before scraping (prebuilt executor only) |
| sourceScripts | boolean run scripts using source command (container executor only) |
| scraperTemplate | string scraper template extensions |
| scraperTemplateReference | string name of the template resource |
| pvcTemplate | string pvc template extensions |
| pvcTemplateReference | string name of the template resource |
Array of objects (EnvReference) config map references | |
Array of objects (EnvReference) secret references | |
object (RunningContext) running context for test or test suite execution | |
| testExecutionName | string test execution name started the test execution |
| downloadArtifactExecutionIDs | Array of strings execution ids for artifacts to download |
| downloadArtifactTestNames | Array of strings test names for artifacts to download from latest executions |
object (PodRequest) pod request body | |
| executionNamespace | string namespace for test execution (Pro edition only) |
Responses
Request samples
- Payload
{- "id": "62f395e004109209b50edfc1",
- "name": "testing with 1000 users",
- "testSuiteName": "test-suite1",
- "number": 0,
- "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "namespace": "testkube",
- "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "args_mode": "append",
- "image": "kubeshop/testkube-executor-custom:1.10.11-dev-0a9c91",
- "imagePullSecrets": [
- {
- "name": "string"
}
], - "envs": {
- "record": "true",
- "prefix": "some-"
}, - "secretEnvs": {
- "secret_key_name1": "secret-name",
- "secret_Key_name2": "secret-name"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "negativeTest": false,
- "isNegativeTestChangedOnRun": false,
- "activeDeadlineSeconds": 1,
- "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "envConfigMaps": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "envSecrets": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}Response samples
- 201
- 400
- 404
- 500
- 502
[- {
- "status": "queued",
- "output": "string",
- "outputType": "text/plain",
- "errorMessage": "string",
- "steps": [
- {
- "name": "step1",
- "duration": "10m0s",
- "status": "passed",
- "assertionResults": [
- {
- "name": "assertion1",
- "status": "passed",
- "errorMessage": "string"
}
]
}
], - "reports": {
- "junit": "string"
}
}
]List tests
List available tests
query Parameters
| selector | string Labels to filter by |
| textSearch | string Default: "" text to search in name and test name |
Responses
Response samples
- 200
- 400
- 502
[- {
- "name": "test1",
- "namespace": "testkube",
- "description": "this test is used for that purpose",
- "type": "postman/collection",
- "content": {
- "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}, - "source": "my-private-repository-test",
- "created": "2022-07-30T06:54:15Z",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "schedule": "* * * * *",
- "readOnly": true,
- "uploads": [
- "settings/config.txt"
], - "executionRequest": {
- "id": "62f395e004109209b50edfc1",
- "name": "testing with 1000 users",
- "testSuiteName": "test-suite1",
- "number": 0,
- "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "namespace": "testkube",
- "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "testSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "testSuiteSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "args_mode": "append",
- "image": "kubeshop/testkube-executor-custom:1.10.11-dev-0a9c91",
- "imagePullSecrets": [
- {
- "name": "string"
}
], - "envs": {
- "record": "true",
- "prefix": "some-"
}, - "secretEnvs": {
- "secret_key_name1": "secret-name",
- "secret_Key_name2": "secret-name"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "negativeTest": false,
- "isNegativeTestChangedOnRun": false,
- "activeDeadlineSeconds": 1,
- "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "envConfigMaps": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "envSecrets": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}, - "status": {
- "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "number": 1,
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "status": "queued"
}
}
}
]Create new test
Create new test based on file content, uri or git based data
Request Body schema:
test details body
| name | string test name |
| namespace | string test namespace |
| description | string test description |
| type | string test type |
object (TestContent) | |
| source | string reference to test source resource |
| created | string <date-time> |
object test labels | |
| schedule | string schedule to run test |
| readOnly | boolean if test is offline and cannot be executed |
| uploads | Array of strings list of file paths that will be needed from uploads |
object (ExecutionRequest) test execution request body | |
object (TestStatus) test status |
Responses
Request samples
- Payload
{- "name": "test1",
- "namespace": "testkube",
- "description": "this test is used for that purpose",
- "type": "postman/collection",
- "content": {
- "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}, - "source": "my-private-repository-test",
- "created": "2022-07-30T06:54:15Z",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "schedule": "* * * * *",
- "readOnly": true,
- "uploads": [
- "settings/config.txt"
], - "executionRequest": {
- "id": "62f395e004109209b50edfc1",
- "name": "testing with 1000 users",
- "testSuiteName": "test-suite1",
- "number": 0,
- "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "namespace": "testkube",
- "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "args_mode": "append",
- "image": "kubeshop/testkube-executor-custom:1.10.11-dev-0a9c91",
- "imagePullSecrets": [
- {
- "name": "string"
}
], - "envs": {
- "record": "true",
- "prefix": "some-"
}, - "secretEnvs": {
- "secret_key_name1": "secret-name",
- "secret_Key_name2": "secret-name"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "negativeTest": false,
- "isNegativeTestChangedOnRun": false,
- "activeDeadlineSeconds": 1,
- "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "envConfigMaps": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "envSecrets": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}, - "status": {
- "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "number": 1,
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "status": "queued"
}
}
}Response samples
- 201
- 400
- 502
{- "name": "test1",
- "namespace": "testkube",
- "description": "this test is used for that purpose",
- "type": "postman/collection",
- "content": {
- "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}, - "source": "my-private-repository-test",
- "created": "2022-07-30T06:54:15Z",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "schedule": "* * * * *",
- "readOnly": true,
- "uploads": [
- "settings/config.txt"
], - "executionRequest": {
- "id": "62f395e004109209b50edfc1",
- "name": "testing with 1000 users",
- "testSuiteName": "test-suite1",
- "number": 0,
- "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "namespace": "testkube",
- "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "testSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "testSuiteSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "args_mode": "append",
- "image": "kubeshop/testkube-executor-custom:1.10.11-dev-0a9c91",
- "imagePullSecrets": [
- {
- "name": "string"
}
], - "envs": {
- "record": "true",
- "prefix": "some-"
}, - "secretEnvs": {
- "secret_key_name1": "secret-name",
- "secret_Key_name2": "secret-name"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "negativeTest": false,
- "isNegativeTestChangedOnRun": false,
- "activeDeadlineSeconds": 1,
- "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "envConfigMaps": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "envSecrets": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}, - "status": {
- "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "number": 1,
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "status": "queued"
}
}
}Update test
Update test based on test content or git based data
path Parameters
| id required | string unique id of the object |
Request Body schema:
test details body
| name | string test name |
| namespace | string test namespace |
| description | string test description |
| type | string test type |
object (TestContent) | |
| source | string reference to test source resource |
| created | string <date-time> |
object test labels | |
| schedule | string schedule to run test |
| readOnly | boolean if test is offline and cannot be executed |
| uploads | Array of strings list of file paths that will be needed from uploads |
object (ExecutionRequest) test execution request body | |
object (TestStatus) test status |
Responses
Request samples
- Payload
{- "name": "test1",
- "namespace": "testkube",
- "description": "this test is used for that purpose",
- "type": "postman/collection",
- "content": {
- "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}, - "source": "my-private-repository-test",
- "created": "2022-07-30T06:54:15Z",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "schedule": "* * * * *",
- "readOnly": true,
- "uploads": [
- "settings/config.txt"
], - "executionRequest": {
- "id": "62f395e004109209b50edfc1",
- "name": "testing with 1000 users",
- "testSuiteName": "test-suite1",
- "number": 0,
- "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "namespace": "testkube",
- "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "args_mode": "append",
- "image": "kubeshop/testkube-executor-custom:1.10.11-dev-0a9c91",
- "imagePullSecrets": [
- {
- "name": "string"
}
], - "envs": {
- "record": "true",
- "prefix": "some-"
}, - "secretEnvs": {
- "secret_key_name1": "secret-name",
- "secret_Key_name2": "secret-name"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "negativeTest": false,
- "isNegativeTestChangedOnRun": false,
- "activeDeadlineSeconds": 1,
- "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "envConfigMaps": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "envSecrets": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}, - "status": {
- "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "number": 1,
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "status": "queued"
}
}
}Response samples
- 200
- 400
- 404
- 502
{- "name": "test1",
- "namespace": "testkube",
- "description": "this test is used for that purpose",
- "type": "postman/collection",
- "content": {
- "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}, - "source": "my-private-repository-test",
- "created": "2022-07-30T06:54:15Z",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "schedule": "* * * * *",
- "readOnly": true,
- "uploads": [
- "settings/config.txt"
], - "executionRequest": {
- "id": "62f395e004109209b50edfc1",
- "name": "testing with 1000 users",
- "testSuiteName": "test-suite1",
- "number": 0,
- "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "namespace": "testkube",
- "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "testSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "testSuiteSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "args_mode": "append",
- "image": "kubeshop/testkube-executor-custom:1.10.11-dev-0a9c91",
- "imagePullSecrets": [
- {
- "name": "string"
}
], - "envs": {
- "record": "true",
- "prefix": "some-"
}, - "secretEnvs": {
- "secret_key_name1": "secret-name",
- "secret_Key_name2": "secret-name"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "negativeTest": false,
- "isNegativeTestChangedOnRun": false,
- "activeDeadlineSeconds": 1,
- "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "envConfigMaps": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "envSecrets": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}, - "status": {
- "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "number": 1,
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "status": "queued"
}
}
}Response samples
- 200
- 400
- 404
- 502
{- "name": "test1",
- "namespace": "testkube",
- "description": "this test is used for that purpose",
- "type": "postman/collection",
- "content": {
- "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}, - "source": "my-private-repository-test",
- "created": "2022-07-30T06:54:15Z",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "schedule": "* * * * *",
- "readOnly": true,
- "uploads": [
- "settings/config.txt"
], - "executionRequest": {
- "id": "62f395e004109209b50edfc1",
- "name": "testing with 1000 users",
- "testSuiteName": "test-suite1",
- "number": 0,
- "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "namespace": "testkube",
- "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "testSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "testSuiteSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "args_mode": "append",
- "image": "kubeshop/testkube-executor-custom:1.10.11-dev-0a9c91",
- "imagePullSecrets": [
- {
- "name": "string"
}
], - "envs": {
- "record": "true",
- "prefix": "some-"
}, - "secretEnvs": {
- "secret_key_name1": "secret-name",
- "secret_Key_name2": "secret-name"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "negativeTest": false,
- "isNegativeTestChangedOnRun": false,
- "activeDeadlineSeconds": 1,
- "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "envConfigMaps": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "envSecrets": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}, - "status": {
- "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "number": 1,
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "status": "queued"
}
}
}Delete test
Deletes a test
path Parameters
| id required | string unique id of the object |
query Parameters
| skipDeleteExecutions | boolean Default: false dont delete executions |
Responses
Response samples
- 404
- 500
- 502
[- {
- "title": "Invalid test name",
- "status": 500,
- "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
}
]Abort all executions of a test
Abort all test executions
path Parameters
| id required | string unique id of the object |
Responses
Response samples
- 404
- 500
- 502
[- {
- "title": "Invalid test name",
- "status": 500,
- "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
}
]Get test metrics
Gets test metrics for given tests executions, with particular execution status and timings
path Parameters
| id required | string unique id of the object |
query Parameters
| last | integer Default: 7 last N days to show |
| limit | integer Default: 7 limit records count same as pageSize |
Responses
Response samples
- 200
- 500
- 502
{- "passFailRatio": 50,
- "executionDurationP50": "7m2.71s",
- "executionDurationP50ms": 422,
- "executionDurationP90": "7m2.71s",
- "executionDurationP90ms": 422,
- "executionDurationP95": "7m2.71s",
- "executionDurationP95ms": 422,
- "executionDurationP99": "7m2.71s",
- "executionDurationP99ms": 422,
- "totalExecutions": 2,
- "failedExecutions": 1,
- "executions": [
- {
- "executionId": "string",
- "duration": "string",
- "durationMs": 0,
- "status": "string",
- "name": "string",
- "startTime": "2019-08-24T14:15:22Z"
}
]
}List test with executions
List available test with executions
query Parameters
| selector | string Labels to filter by |
| textSearch | string Default: "" text to search in name and test name |
| status | string (ExecutionStatus) Enum: "queued" "running" "passed" "failed" "aborted" "timeout" "skipped" optional status filter containing multiple values separated by comma |
| pageSize | integer Default: 100 the number of executions to get, setting to 0 will return only totals |
| page | integer Default: 0 the page index to start at |
Responses
Response samples
- 200
- 400
- 500
- 502
[- {
- "test": {
- "name": "test1",
- "namespace": "testkube",
- "description": "this test is used for that purpose",
- "type": "postman/collection",
- "content": {
- "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}, - "source": "my-private-repository-test",
- "created": "2022-07-30T06:54:15Z",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "schedule": "* * * * *",
- "readOnly": true,
- "uploads": [
- "settings/config.txt"
], - "executionRequest": {
- "id": "62f395e004109209b50edfc1",
- "name": "testing with 1000 users",
- "testSuiteName": "test-suite1",
- "number": 0,
- "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "namespace": "testkube",
- "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "testSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "testSuiteSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "args_mode": "append",
- "image": "kubeshop/testkube-executor-custom:1.10.11-dev-0a9c91",
- "imagePullSecrets": [
- {
- "name": "string"
}
], - "envs": {
- "record": "true",
- "prefix": "some-"
}, - "secretEnvs": {
- "secret_key_name1": "secret-name",
- "secret_Key_name2": "secret-name"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "negativeTest": false,
- "isNegativeTestChangedOnRun": false,
- "activeDeadlineSeconds": 1,
- "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "envConfigMaps": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "envSecrets": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}, - "status": {
- "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "number": 1,
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "status": "queued"
}
}
}, - "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "name": "test-suite1-test1",
- "number": 1,
- "testName": "test1",
- "testNamespace": "testkube",
- "testType": "postman/collection",
- "status": "queued",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "00:00:13",
- "durationMs": 10000,
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}
}
}
]Get test with execution
Gets the specified test with execution
path Parameters
| id required | string unique id of the object |
Responses
Response samples
- 200
- 400
- 404
- 500
- 502
{- "test": {
- "name": "test1",
- "namespace": "testkube",
- "description": "this test is used for that purpose",
- "type": "postman/collection",
- "content": {
- "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}, - "source": "my-private-repository-test",
- "created": "2022-07-30T06:54:15Z",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "schedule": "* * * * *",
- "readOnly": true,
- "uploads": [
- "settings/config.txt"
], - "executionRequest": {
- "id": "62f395e004109209b50edfc1",
- "name": "testing with 1000 users",
- "testSuiteName": "test-suite1",
- "number": 0,
- "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "namespace": "testkube",
- "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "testSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "testSuiteSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "args_mode": "append",
- "image": "kubeshop/testkube-executor-custom:1.10.11-dev-0a9c91",
- "imagePullSecrets": [
- {
- "name": "string"
}
], - "envs": {
- "record": "true",
- "prefix": "some-"
}, - "secretEnvs": {
- "secret_key_name1": "secret-name",
- "secret_Key_name2": "secret-name"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "negativeTest": false,
- "isNegativeTestChangedOnRun": false,
- "activeDeadlineSeconds": 1,
- "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "envConfigMaps": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "envSecrets": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}, - "status": {
- "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "number": 1,
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "status": "queued"
}
}
}, - "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "testName": "example-test",
- "testSuiteName": "test-suite1",
- "testNamespace": "testkube",
- "testType": "postman/collection",
- "name": "test-suite1-example-test-1",
- "number": 1,
- "envs": {
- "record": "true",
- "prefix": "some-"
}, - "command": [
- "curl"
], - "args": [
- "--concurrency",
- "2",
- "--remote",
- "--some",
- "blabla"
], - "args_mode": "append",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "testSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "testSuiteSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "content": {
- "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}, - "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "88s",
- "durationMs": 10000,
- "executionResult": {
- "status": "queued",
- "output": "string",
- "outputType": "text/plain",
- "errorMessage": "string",
- "steps": [
- {
- "name": "step1",
- "duration": "10m0s",
- "status": "passed",
- "assertionResults": [
- {
- "name": "assertion1",
- "status": "passed",
- "errorMessage": "string"
}
]
}
], - "reports": {
- "junit": "string"
}
}, - "labels": {
- "env": "prod",
- "app": "backend"
}, - "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "containerShell": "/bin/sh",
- "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}
}Starts new test execution
New test execution returns new execution details on successful execution start
path Parameters
| id required | string unique id of the object |
query Parameters
| namespace | string Default: "testkube" Namespace of the object |
| testExecutionName | string test execution name stated the test execution |
Request Body schema: application/json
body passed to configure execution
| id | string <bson objectId> execution id |
| name | string test execution custom name |
| testSuiteName | string unique test suite name (CRD Test suite name), if it's run as a part of test suite |
| number | integer test execution number |
object test execution labels | |
| namespace | string test kubernetes namespace ("testkube" when not set) |
| isVariablesFileUploaded | boolean in case the variables file is too big, it will be uploaded |
| variablesFile | string variables file content - need to be in format for particular executor (e.g. postman envs file) |
object (Variables) execution variables passed to executor converted to vars for usage in tests | |
| command | Array of strings executor image command |
| args | Array of strings additional executor binary arguments |
| args_mode | string Enum: "append" "override" "replace" usage mode for arguments |
| image | string container image, executor will run inside this image |
Array of objects (LocalObjectReference) container image pull secrets | |
object Deprecated Environment variables passed to executor. Deprecated: use Basic Variables instead | |
object Deprecated Execution variables passed to executor from secrets. Deprecated: use Secret Variables instead | |
| sync | boolean whether to start execution sync or async |
| httpProxy | string http proxy for executor containers |
| httpsProxy | string https proxy for executor containers |
| negativeTest | boolean whether to run test as negative test |
| isNegativeTestChangedOnRun | boolean whether negativeTest was changed by user |
| activeDeadlineSeconds | integer <int64> duration in seconds the test may be active, until its stopped |
| uploads | Array of strings list of file paths that need to be copied into the test from uploads |
| bucketName | string minio bucket name to get uploads from |
object (ArtifactRequest) artifact request body with test artifacts | |
| jobTemplate | string job template extensions |
| jobTemplateReference | string name of the template resource |
| cronJobTemplate | string cron job template extensions |
| cronJobTemplateReference | string name of the template resource |
object (TestContentRequest) test content request body | |
| preRunScript | string script to run before test execution |
| postRunScript | string script to run after test execution |
| executePostRunScriptBeforeScraping | boolean execute post run script before scraping (prebuilt executor only) |
| sourceScripts | boolean run scripts using source command (container executor only) |
| scraperTemplate | string scraper template extensions |
| scraperTemplateReference | string name of the template resource |
| pvcTemplate | string pvc template extensions |
| pvcTemplateReference | string name of the template resource |
Array of objects (EnvReference) config map references | |
Array of objects (EnvReference) secret references | |
object (RunningContext) running context for test or test suite execution | |
| testExecutionName | string test execution name started the test execution |
| downloadArtifactExecutionIDs | Array of strings execution ids for artifacts to download |
| downloadArtifactTestNames | Array of strings test names for artifacts to download from latest executions |
object (PodRequest) pod request body | |
| executionNamespace | string namespace for test execution (Pro edition only) |
Responses
Request samples
- Payload
{- "id": "62f395e004109209b50edfc1",
- "name": "testing with 1000 users",
- "testSuiteName": "test-suite1",
- "number": 0,
- "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "namespace": "testkube",
- "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "args_mode": "append",
- "image": "kubeshop/testkube-executor-custom:1.10.11-dev-0a9c91",
- "imagePullSecrets": [
- {
- "name": "string"
}
], - "envs": {
- "record": "true",
- "prefix": "some-"
}, - "secretEnvs": {
- "secret_key_name1": "secret-name",
- "secret_Key_name2": "secret-name"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "negativeTest": false,
- "isNegativeTestChangedOnRun": false,
- "activeDeadlineSeconds": 1,
- "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "envConfigMaps": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "envSecrets": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}Response samples
- 201
- 400
- 404
- 500
- 502
{- "status": "queued",
- "output": "string",
- "outputType": "text/plain",
- "errorMessage": "string",
- "steps": [
- {
- "name": "step1",
- "duration": "10m0s",
- "status": "passed",
- "assertionResults": [
- {
- "name": "assertion1",
- "status": "passed",
- "errorMessage": "string"
}
]
}
], - "reports": {
- "junit": "string"
}
}Get all test executions
Returns array of all available test executions
path Parameters
| id required | string unique id of the object |
query Parameters
| last | integer Default: 7 last N days to show |
| pageSize | integer Default: 100 the number of executions to get, setting to 0 will return only totals |
| page | integer Default: 0 the page index to start at |
| status | string (ExecutionStatus) Enum: "queued" "running" "passed" "failed" "aborted" "timeout" "skipped" optional status filter containing multiple values separated by comma |
| startDate | string <date> startDate for filtering in ISO-8601 format, i.e. "yyyy-mm-dd" |
| endDate | string <date> endDate for filtering |
Responses
Response samples
- 200
- 404
- 500
{- "totals": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "filtered": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "results": [
- {
- "id": "62f395e004109209b50edfc4",
- "name": "test-suite1-test1",
- "number": 1,
- "testName": "test1",
- "testNamespace": "testkube",
- "testType": "postman/collection",
- "status": "queued",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "00:00:13",
- "durationMs": 10000,
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}
}
]
}Get test execution
Returns execution with given executionID
path Parameters
| id required | string unique id of the object |
| executionID required | string unique id of the object execution |
Responses
Response samples
- 200
- 404
- 500
- 502
{- "id": "62f395e004109209b50edfc4",
- "testName": "example-test",
- "testSuiteName": "test-suite1",
- "testNamespace": "testkube",
- "testType": "postman/collection",
- "name": "test-suite1-example-test-1",
- "number": 1,
- "envs": {
- "record": "true",
- "prefix": "some-"
}, - "command": [
- "curl"
], - "args": [
- "--concurrency",
- "2",
- "--remote",
- "--some",
- "blabla"
], - "args_mode": "append",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "testSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "testSuiteSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "content": {
- "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}, - "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "88s",
- "durationMs": 10000,
- "executionResult": {
- "status": "queued",
- "output": "string",
- "outputType": "text/plain",
- "errorMessage": "string",
- "steps": [
- {
- "name": "step1",
- "duration": "10m0s",
- "status": "passed",
- "assertionResults": [
- {
- "name": "assertion1",
- "status": "passed",
- "errorMessage": "string"
}
]
}
], - "reports": {
- "junit": "string"
}
}, - "labels": {
- "env": "prod",
- "app": "backend"
}, - "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "containerShell": "/bin/sh",
- "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}Aborts execution
Aborts execution with given executionID
path Parameters
| id required | string unique id of the object |
| executionID required | string unique id of the object execution |
Responses
Response samples
- 502
[- {
- "title": "Invalid test name",
- "status": 500,
- "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
}
]Starts new test suite execution
New test suite execution returns new execution details on successful execution start
path Parameters
| id required | string unique id of the object |
query Parameters
| namespace | string Default: "testkube" Namespace of the object |
| last | integer Default: 7 last N days to show |
| testSuiteExecutionName | string test suite execution name stated the test suite execution |
Request Body schema: application/json
body passed to configure execution
| name | string test execution custom name |
| number | integer test suite execution number |
| namespace | string test kubernetes namespace ("testkube" when not set) |
object (Variables) execution variables passed to executor converted to vars for usage in tests | |
object test suite labels | |
object execution labels | |
| sync | boolean whether to start execution sync or async |
| httpProxy | string http proxy for executor containers |
| httpsProxy | string https proxy for executor containers |
| timeout | integer <int32> duration in seconds the test suite may be active, until its stopped |
object (TestContentRequest) test content request body | |
object (RunningContext) running context for test or test suite execution | |
| jobTemplate | string job template extensions |
| jobTemplateReference | string name of the template resource |
| cronJobTemplate | string cron job template extensions |
| cronJobTemplateReference | string name of the template resource |
| scraperTemplate | string scraper template extensions |
| scraperTemplateReference | string name of the template resource |
| pvcTemplate | string pvc template extensions |
| pvcTemplateReference | string name of the template resource |
| concurrencyLevel | integer <int32> number of tests run in parallel |
| testSuiteExecutionName | string test suite execution name started the test suite execution |
Responses
Request samples
- Payload
{- "name": "testing with 1000 users",
- "number": 1,
- "namespace": "testkube",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "labels": {
- "users": "3",
- "prefix": "some-"
}, - "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "timeout": 1,
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "concurrencyLevel": 10,
- "testSuiteExecutionName": "string"
}Response samples
- 201
- 400
- 404
- 500
- 502
{- "totals": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "filtered": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "results": [
- {
- "id": "62f395e004109209b50edfc1",
- "name": "test-suite1.needlessly-sweet-imp",
- "testSuiteName": "test-suite1",
- "status": "queued",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "00:00:09",
- "durationMs": 9009,
- "execution": [
- {
- "execute": [
- {
- "id": "62f395e004109209b50edfc4",
- "name": "run:testkube/test1",
- "testName": "test1",
- "status": "queued",
- "type": "executeTest"
}
]
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}
}
]
}Get all test suite executions
Returns array of all available test suite executions
path Parameters
| id required | string unique id of the object |
query Parameters
| pageSize | integer Default: 100 the number of executions to get, setting to 0 will return only totals |
| page | integer Default: 0 the page index to start at |
| status | string (TestSuiteExecutionStatus) Enum: "queued" "running" "passed" "failed" "aborting" "aborted" "timeout" optional status filter containing multiple values separated by comma |
| startDate | string <date> startDate for filtering in ISO-8601 format, i.e. "yyyy-mm-dd" |
| endDate | string <date> endDate for filtering |
Responses
Response samples
- 200
- 500
{- "totals": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "filtered": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "results": [
- {
- "id": "62f395e004109209b50edfc1",
- "name": "test-suite1.needlessly-sweet-imp",
- "testSuiteName": "test-suite1",
- "status": "queued",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "00:00:09",
- "durationMs": 9009,
- "execution": [
- {
- "execute": [
- {
- "id": "62f395e004109209b50edfc4",
- "name": "run:testkube/test1",
- "testName": "test1",
- "status": "queued",
- "type": "executeTest"
}
]
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}
}
]
}Get test suite execution
Returns test suite execution with given executionID
path Parameters
| id required | string unique id of the object |
| executionID required | string unique id of the object execution |
Responses
Response samples
- 200
- 404
- 500
- 502
{- "id": "62f395e004109209b50edfc1",
- "name": "test-suite1.needlessly-sweet-imp",
- "testSuite": {
- "namespace": "testkube",
- "name": "name"
}, - "status": "queued",
- "envs": {
- "record": "true",
- "prefix": "some-"
}, - "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "secretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "2m",
- "durationMs": 6000,
- "stepResults": [
- {
- "step": {
- "stopTestOnFailure": true,
- "execute": {
- "namespace": "testkube",
- "name": "name"
}, - "delay": {
- "duration": 0
}
}, - "test": {
- "namespace": "testkube",
- "name": "name"
}, - "execution": {
- "id": "62f395e004109209b50edfc4",
- "testName": "example-test",
- "testSuiteName": "test-suite1",
- "testNamespace": "testkube",
- "testType": "postman/collection",
- "name": "test-suite1-example-test-1",
- "number": 1,
- "envs": {
- "record": "true",
- "prefix": "some-"
}, - "command": [
- "curl"
], - "args": [
- "--concurrency",
- "2",
- "--remote",
- "--some",
- "blabla"
], - "args_mode": "append",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "testSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "testSuiteSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "content": {
- "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}, - "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "88s",
- "durationMs": 10000,
- "executionResult": {
- "status": "queued",
- "output": "string",
- "outputType": "text/plain",
- "errorMessage": "string",
- "steps": [
- {
- "name": "step1",
- "duration": "10m0s",
- "status": "passed",
- "assertionResults": [
- {
- "name": "assertion1",
- "status": "passed",
- "errorMessage": "string"
}
]
}
], - "reports": {
- "junit": "string"
}
}, - "labels": {
- "env": "prod",
- "app": "backend"
}, - "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "containerShell": "/bin/sh",
- "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}
}
], - "executeStepResults": [
- {
- "step": {
- "stopOnFailure": true,
- "downloadArtifacts": {
- "allPreviousSteps": false,
- "previousStepNumbers": [
- 0
], - "previousTestNames": [
- "string"
]
}, - "execute": [
- {
- "test": "name",
- "delay": "1s",
- "executionRequest": {
- "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "args_mode": "append",
- "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "negativeTest": false,
- "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "runningContext": {
- "type": "userCLI",
- "context": "string"
}
}
}
]
}, - "execute": [
- {
- "step": {
- "test": "name",
- "delay": "1s",
- "executionRequest": {
- "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "args_mode": "append",
- "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "negativeTest": false,
- "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "runningContext": {
- "type": "userCLI",
- "context": "string"
}
}
}, - "test": {
- "namespace": "testkube",
- "name": "name"
}, - "execution": {
- "id": "62f395e004109209b50edfc4",
- "testName": "example-test",
- "testSuiteName": "test-suite1",
- "testNamespace": "testkube",
- "testType": "postman/collection",
- "name": "test-suite1-example-test-1",
- "number": 1,
- "envs": {
- "record": "true",
- "prefix": "some-"
}, - "command": [
- "curl"
], - "args": [
- "--concurrency",
- "2",
- "--remote",
- "--some",
- "blabla"
], - "args_mode": "append",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "testSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "testSuiteSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "content": {
- "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}, - "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "88s",
- "durationMs": 10000,
- "executionResult": {
- "status": "queued",
- "output": "string",
- "outputType": "text/plain",
- "errorMessage": "string",
- "steps": [
- {
- "name": "step1",
- "duration": "10m0s",
- "status": "passed",
- "assertionResults": [
- null
]
}
], - "reports": {
- "junit": "string"
}
}, - "labels": {
- "env": "prod",
- "app": "backend"
}, - "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "containerShell": "/bin/sh",
- "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}
}
], - "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "2m"
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "testSuiteExecutionName": "string"
}Aborts testsuite execution
Aborts testsuite execution with given executionID
path Parameters
| id required | string unique id of the object |
| executionID required | string unique id of the object execution |
Responses
Response samples
- 404
- 500
[- {
- "title": "Invalid test name",
- "status": 500,
- "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
}
]Get test suite execution artifacts
Returns test suite execution artifacts with given executionID
path Parameters
| id required | string unique id of the object |
| executionID required | string unique id of the object execution |
Responses
Response samples
- 200
- 404
- 500
{- "name": "string",
- "size": 0,
- "executionName": "test-1",
- "status": "ready"
}Starts new test suite executions
New test suite executions returns new executions details on successful executions start
query Parameters
| namespace | string Default: "testkube" Namespace of the object |
| selector | string Labels to filter by |
| concurrency | integer Default: 10 |
Request Body schema: application/json
body passed to configure executions
| name | string test execution custom name |
| number | integer test suite execution number |
| namespace | string test kubernetes namespace ("testkube" when not set) |
object (Variables) execution variables passed to executor converted to vars for usage in tests | |
object test suite labels | |
object execution labels | |
| sync | boolean whether to start execution sync or async |
| httpProxy | string http proxy for executor containers |
| httpsProxy | string https proxy for executor containers |
| timeout | integer <int32> duration in seconds the test suite may be active, until its stopped |
object (TestContentRequest) test content request body | |
object (RunningContext) running context for test or test suite execution | |
| jobTemplate | string job template extensions |
| jobTemplateReference | string name of the template resource |
| cronJobTemplate | string cron job template extensions |
| cronJobTemplateReference | string name of the template resource |
| scraperTemplate | string scraper template extensions |
| scraperTemplateReference | string name of the template resource |
| pvcTemplate | string pvc template extensions |
| pvcTemplateReference | string name of the template resource |
| concurrencyLevel | integer <int32> number of tests run in parallel |
| testSuiteExecutionName | string test suite execution name started the test suite execution |
Responses
Request samples
- Payload
{- "name": "testing with 1000 users",
- "number": 1,
- "namespace": "testkube",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "labels": {
- "users": "3",
- "prefix": "some-"
}, - "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "timeout": 1,
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "concurrencyLevel": 10,
- "testSuiteExecutionName": "string"
}Response samples
- 201
- 400
- 500
- 502
[- {
- "totals": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "filtered": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "results": [
- {
- "id": "62f395e004109209b50edfc1",
- "name": "test-suite1.needlessly-sweet-imp",
- "testSuiteName": "test-suite1",
- "status": "queued",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "00:00:09",
- "durationMs": 9009,
- "execution": [
- {
- "execute": [
- {
- "id": "62f395e004109209b50edfc4",
- "name": "run:testkube/test1",
- "testName": "test1",
- "status": "queued",
- "type": "executeTest"
}
]
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}
}
]
}
]Get all test suite executions
Returns array of test suite executions
query Parameters
| last | integer Default: 7 last N days to show |
| test | string Default: "" test namespaced name to filter |
| textSearch | string Default: "" text to search in name and test name |
| pageSize | integer Default: 100 the number of executions to get, setting to 0 will return only totals |
| page | integer Default: 0 the page index to start at |
| status | string (TestSuiteExecutionStatus) Enum: "queued" "running" "passed" "failed" "aborting" "aborted" "timeout" optional status filter containing multiple values separated by comma |
| startDate | string <date> startDate for filtering in ISO-8601 format, i.e. "yyyy-mm-dd" |
| endDate | string <date> endDate for filtering |
| selector | string Labels to filter by |
Responses
Response samples
- 200
- 500
{- "totals": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "filtered": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "results": [
- {
- "id": "62f395e004109209b50edfc1",
- "name": "test-suite1.needlessly-sweet-imp",
- "testSuiteName": "test-suite1",
- "status": "queued",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "00:00:09",
- "durationMs": 9009,
- "execution": [
- {
- "execute": [
- {
- "id": "62f395e004109209b50edfc4",
- "name": "run:testkube/test1",
- "testName": "test1",
- "status": "queued",
- "type": "executeTest"
}
]
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}
}
]
}Get test suite execution by ID
Returns test suite execution with given executionID
path Parameters
| executionID required | string unique id of the object execution |
query Parameters
| last | integer Default: 7 last N days to show |
Responses
Response samples
- 200
- 500
{- "id": "62f395e004109209b50edfc1",
- "name": "test-suite1.needlessly-sweet-imp",
- "testSuite": {
- "namespace": "testkube",
- "name": "name"
}, - "status": "queued",
- "envs": {
- "record": "true",
- "prefix": "some-"
}, - "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "secretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "2m",
- "durationMs": 6000,
- "stepResults": [
- {
- "step": {
- "stopTestOnFailure": true,
- "execute": {
- "namespace": "testkube",
- "name": "name"
}, - "delay": {
- "duration": 0
}
}, - "test": {
- "namespace": "testkube",
- "name": "name"
}, - "execution": {
- "id": "62f395e004109209b50edfc4",
- "testName": "example-test",
- "testSuiteName": "test-suite1",
- "testNamespace": "testkube",
- "testType": "postman/collection",
- "name": "test-suite1-example-test-1",
- "number": 1,
- "envs": {
- "record": "true",
- "prefix": "some-"
}, - "command": [
- "curl"
], - "args": [
- "--concurrency",
- "2",
- "--remote",
- "--some",
- "blabla"
], - "args_mode": "append",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "testSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "testSuiteSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "content": {
- "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}, - "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "88s",
- "durationMs": 10000,
- "executionResult": {
- "status": "queued",
- "output": "string",
- "outputType": "text/plain",
- "errorMessage": "string",
- "steps": [
- {
- "name": "step1",
- "duration": "10m0s",
- "status": "passed",
- "assertionResults": [
- {
- "name": "assertion1",
- "status": "passed",
- "errorMessage": "string"
}
]
}
], - "reports": {
- "junit": "string"
}
}, - "labels": {
- "env": "prod",
- "app": "backend"
}, - "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "containerShell": "/bin/sh",
- "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}
}
], - "executeStepResults": [
- {
- "step": {
- "stopOnFailure": true,
- "downloadArtifacts": {
- "allPreviousSteps": false,
- "previousStepNumbers": [
- 0
], - "previousTestNames": [
- "string"
]
}, - "execute": [
- {
- "test": "name",
- "delay": "1s",
- "executionRequest": {
- "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "args_mode": "append",
- "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "negativeTest": false,
- "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "runningContext": {
- "type": "userCLI",
- "context": "string"
}
}
}
]
}, - "execute": [
- {
- "step": {
- "test": "name",
- "delay": "1s",
- "executionRequest": {
- "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "args_mode": "append",
- "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "negativeTest": false,
- "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "runningContext": {
- "type": "userCLI",
- "context": "string"
}
}
}, - "test": {
- "namespace": "testkube",
- "name": "name"
}, - "execution": {
- "id": "62f395e004109209b50edfc4",
- "testName": "example-test",
- "testSuiteName": "test-suite1",
- "testNamespace": "testkube",
- "testType": "postman/collection",
- "name": "test-suite1-example-test-1",
- "number": 1,
- "envs": {
- "record": "true",
- "prefix": "some-"
}, - "command": [
- "curl"
], - "args": [
- "--concurrency",
- "2",
- "--remote",
- "--some",
- "blabla"
], - "args_mode": "append",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "testSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "testSuiteSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "content": {
- "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}, - "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "88s",
- "durationMs": 10000,
- "executionResult": {
- "status": "queued",
- "output": "string",
- "outputType": "text/plain",
- "errorMessage": "string",
- "steps": [
- {
- "name": "step1",
- "duration": "10m0s",
- "status": "passed",
- "assertionResults": [
- null
]
}
], - "reports": {
- "junit": "string"
}
}, - "labels": {
- "env": "prod",
- "app": "backend"
}, - "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "containerShell": "/bin/sh",
- "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}
}
], - "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "2m"
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "testSuiteExecutionName": "string"
}Aborts testsuite execution
Aborts testsuite execution with given executionID
path Parameters
| executionID required | string unique id of the object execution |
Responses
Response samples
- 502
[- {
- "title": "Invalid test name",
- "status": 500,
- "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
}
]Get test suite execution artifacts
Returns test suite execution artifacts with given executionID
path Parameters
| executionID required | string unique id of the object execution |
Responses
Response samples
- 200
- 500
{- "name": "string",
- "size": 0,
- "executionName": "test-1",
- "status": "ready"
}Starts new test executions
New test executions returns new executions details on successful executions start
query Parameters
| namespace | string Default: "testkube" Namespace of the object |
| selector | string Labels to filter by |
| executionSelector | string Execution Labels to add to executions |
| concurrency | integer Default: 10 |
Request Body schema: application/json
body passed to configure executions
| id | string <bson objectId> execution id |
| name | string test execution custom name |
| testSuiteName | string unique test suite name (CRD Test suite name), if it's run as a part of test suite |
| number | integer test execution number |
object test execution labels | |
| namespace | string test kubernetes namespace ("testkube" when not set) |
| isVariablesFileUploaded | boolean in case the variables file is too big, it will be uploaded |
| variablesFile | string variables file content - need to be in format for particular executor (e.g. postman envs file) |
object (Variables) execution variables passed to executor converted to vars for usage in tests | |
| command | Array of strings executor image command |
| args | Array of strings additional executor binary arguments |
| args_mode | string Enum: "append" "override" "replace" usage mode for arguments |
| image | string container image, executor will run inside this image |
Array of objects (LocalObjectReference) container image pull secrets | |
object Deprecated Environment variables passed to executor. Deprecated: use Basic Variables instead | |
object Deprecated Execution variables passed to executor from secrets. Deprecated: use Secret Variables instead | |
| sync | boolean whether to start execution sync or async |
| httpProxy | string http proxy for executor containers |
| httpsProxy | string https proxy for executor containers |
| negativeTest | boolean whether to run test as negative test |
| isNegativeTestChangedOnRun | boolean whether negativeTest was changed by user |
| activeDeadlineSeconds | integer <int64> duration in seconds the test may be active, until its stopped |
| uploads | Array of strings list of file paths that need to be copied into the test from uploads |
| bucketName | string minio bucket name to get uploads from |
object (ArtifactRequest) artifact request body with test artifacts | |
| jobTemplate | string job template extensions |
| jobTemplateReference | string name of the template resource |
| cronJobTemplate | string cron job template extensions |
| cronJobTemplateReference | string name of the template resource |
object (TestContentRequest) test content request body | |
| preRunScript | string script to run before test execution |
| postRunScript | string script to run after test execution |
| executePostRunScriptBeforeScraping | boolean execute post run script before scraping (prebuilt executor only) |
| sourceScripts | boolean run scripts using source command (container executor only) |
| scraperTemplate | string scraper template extensions |
| scraperTemplateReference | string name of the template resource |
| pvcTemplate | string pvc template extensions |
| pvcTemplateReference | string name of the template resource |
Array of objects (EnvReference) config map references | |
Array of objects (EnvReference) secret references | |
object (RunningContext) running context for test or test suite execution | |
| testExecutionName | string test execution name started the test execution |
| downloadArtifactExecutionIDs | Array of strings execution ids for artifacts to download |
| downloadArtifactTestNames | Array of strings test names for artifacts to download from latest executions |
object (PodRequest) pod request body | |
| executionNamespace | string namespace for test execution (Pro edition only) |
Responses
Request samples
- Payload
{- "id": "62f395e004109209b50edfc1",
- "name": "testing with 1000 users",
- "testSuiteName": "test-suite1",
- "number": 0,
- "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "namespace": "testkube",
- "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "args_mode": "append",
- "image": "kubeshop/testkube-executor-custom:1.10.11-dev-0a9c91",
- "imagePullSecrets": [
- {
- "name": "string"
}
], - "envs": {
- "record": "true",
- "prefix": "some-"
}, - "secretEnvs": {
- "secret_key_name1": "secret-name",
- "secret_Key_name2": "secret-name"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "negativeTest": false,
- "isNegativeTestChangedOnRun": false,
- "activeDeadlineSeconds": 1,
- "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "envConfigMaps": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "envSecrets": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}Response samples
- 201
- 400
- 404
- 500
- 502
[- {
- "status": "queued",
- "output": "string",
- "outputType": "text/plain",
- "errorMessage": "string",
- "steps": [
- {
- "name": "step1",
- "duration": "10m0s",
- "status": "passed",
- "assertionResults": [
- {
- "name": "assertion1",
- "status": "passed",
- "errorMessage": "string"
}
]
}
], - "reports": {
- "junit": "string"
}
}
]Get all test executions
Returns array of test executions
query Parameters
| test | string Default: "" test namespaced name to filter |
| type | string Default: "" object type |
| textSearch | string Default: "" text to search in name and test name |
| pageSize | integer Default: 100 the number of executions to get, setting to 0 will return only totals |
| page | integer Default: 0 the page index to start at |
| status | string (ExecutionStatus) Enum: "queued" "running" "passed" "failed" "aborted" "timeout" "skipped" optional status filter containing multiple values separated by comma |
| startDate | string <date> startDate for filtering in ISO-8601 format, i.e. "yyyy-mm-dd" |
| endDate | string <date> endDate for filtering |
| selector | string Labels to filter by |
Responses
Response samples
- 200
- 404
- 500
{- "totals": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "filtered": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "results": [
- {
- "id": "62f395e004109209b50edfc4",
- "name": "test-suite1-test1",
- "number": 1,
- "testName": "test1",
- "testNamespace": "testkube",
- "testType": "postman/collection",
- "status": "queued",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "00:00:13",
- "durationMs": 10000,
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}
}
]
}Get test execution by ID
Returns execution with given executionID
path Parameters
| executionID required | string unique id of the object execution |
Responses
Response samples
- 200
- 404
- 500
- 502
{- "id": "62f395e004109209b50edfc4",
- "testName": "example-test",
- "testSuiteName": "test-suite1",
- "testNamespace": "testkube",
- "testType": "postman/collection",
- "name": "test-suite1-example-test-1",
- "number": 1,
- "envs": {
- "record": "true",
- "prefix": "some-"
}, - "command": [
- "curl"
], - "args": [
- "--concurrency",
- "2",
- "--remote",
- "--some",
- "blabla"
], - "args_mode": "append",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "testSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "testSuiteSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "content": {
- "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}, - "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "88s",
- "durationMs": 10000,
- "executionResult": {
- "status": "queued",
- "output": "string",
- "outputType": "text/plain",
- "errorMessage": "string",
- "steps": [
- {
- "name": "step1",
- "duration": "10m0s",
- "status": "passed",
- "assertionResults": [
- {
- "name": "assertion1",
- "status": "passed",
- "errorMessage": "string"
}
]
}
], - "reports": {
- "junit": "string"
}
}, - "labels": {
- "env": "prod",
- "app": "backend"
}, - "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "containerShell": "/bin/sh",
- "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}Get execution's logs by ID
Returns logs of the given executionID
path Parameters
| id required | string unique id of the object |
Responses
Response samples
- 200
- 500
[- {
- "type": "error",
- "content": "string",
- "result": {
- "status": "queued",
- "output": "string",
- "outputType": "text/plain",
- "errorMessage": "string",
- "steps": [
- {
- "name": "step1",
- "duration": "10m0s",
- "status": "passed",
- "assertionResults": [
- {
- "name": "assertion1",
- "status": "passed",
- "errorMessage": "string"
}
]
}
], - "reports": {
- "junit": "string"
}
}, - "time": "2018-03-20T09:12:28Z"
}
]Get execution's logs by ID version 2
Returns logs of the given executionID version 2
path Parameters
| id required | string unique id of the object |
Responses
Response samples
- 200
- 500
[- {
- "time": "2018-03-20T09:12:28Z",
- "content": "string",
- "type": "string",
- "source": "job-pod",
- "error": true,
- "version": "v1",
- "metadata": {
- "argsl": "passed command arguments"
}, - "v1": {
- "result": {
- "status": "queued",
- "output": "string",
- "outputType": "text/plain",
- "errorMessage": "string",
- "steps": [
- {
- "name": "step1",
- "duration": "10m0s",
- "status": "passed",
- "assertionResults": [
- {
- "name": "assertion1",
- "status": "passed",
- "errorMessage": "string"
}
]
}
], - "reports": {
- "junit": "string"
}
}
}
}
]Download artifact
Download the artifact file from the given execution
path Parameters
| id required | string unique id of the object |
| filename required | string filename of the object usually used for artifacts |
Responses
Response samples
- 404
- 500
[- {
- "title": "Invalid test name",
- "status": 500,
- "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
}
]Download artifact archive
Download the artifact archive from the given execution
path Parameters
| id required | string unique id of the object |
query Parameters
| mask | string mask to filter files |
Responses
Response samples
- 404
- 500
[- {
- "title": "Invalid test name",
- "status": 500,
- "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
}
]Starts new test execution
New test execution returns new execution details on successful execution start
path Parameters
| id required | string unique id of the object |
query Parameters
| namespace | string Default: "testkube" Namespace of the object |
| testExecutionName | string test execution name stated the test execution |
Request Body schema: application/json
body passed to configure execution
| id | string <bson objectId> execution id |
| name | string test execution custom name |
| testSuiteName | string unique test suite name (CRD Test suite name), if it's run as a part of test suite |
| number | integer test execution number |
object test execution labels | |
| namespace | string test kubernetes namespace ("testkube" when not set) |
| isVariablesFileUploaded | boolean in case the variables file is too big, it will be uploaded |
| variablesFile | string variables file content - need to be in format for particular executor (e.g. postman envs file) |
object (Variables) execution variables passed to executor converted to vars for usage in tests | |
| command | Array of strings executor image command |
| args | Array of strings additional executor binary arguments |
| args_mode | string Enum: "append" "override" "replace" usage mode for arguments |
| image | string container image, executor will run inside this image |
Array of objects (LocalObjectReference) container image pull secrets | |
object Deprecated Environment variables passed to executor. Deprecated: use Basic Variables instead | |
object Deprecated Execution variables passed to executor from secrets. Deprecated: use Secret Variables instead | |
| sync | boolean whether to start execution sync or async |
| httpProxy | string http proxy for executor containers |
| httpsProxy | string https proxy for executor containers |
| negativeTest | boolean whether to run test as negative test |
| isNegativeTestChangedOnRun | boolean whether negativeTest was changed by user |
| activeDeadlineSeconds | integer <int64> duration in seconds the test may be active, until its stopped |
| uploads | Array of strings list of file paths that need to be copied into the test from uploads |
| bucketName | string minio bucket name to get uploads from |
object (ArtifactRequest) artifact request body with test artifacts | |
| jobTemplate | string job template extensions |
| jobTemplateReference | string name of the template resource |
| cronJobTemplate | string cron job template extensions |
| cronJobTemplateReference | string name of the template resource |
object (TestContentRequest) test content request body | |
| preRunScript | string script to run before test execution |
| postRunScript | string script to run after test execution |
| executePostRunScriptBeforeScraping | boolean execute post run script before scraping (prebuilt executor only) |
| sourceScripts | boolean run scripts using source command (container executor only) |
| scraperTemplate | string scraper template extensions |
| scraperTemplateReference | string name of the template resource |
| pvcTemplate | string pvc template extensions |
| pvcTemplateReference | string name of the template resource |
Array of objects (EnvReference) config map references | |
Array of objects (EnvReference) secret references | |
object (RunningContext) running context for test or test suite execution | |
| testExecutionName | string test execution name started the test execution |
| downloadArtifactExecutionIDs | Array of strings execution ids for artifacts to download |
| downloadArtifactTestNames | Array of strings test names for artifacts to download from latest executions |
object (PodRequest) pod request body | |
| executionNamespace | string namespace for test execution (Pro edition only) |
Responses
Request samples
- Payload
{- "id": "62f395e004109209b50edfc1",
- "name": "testing with 1000 users",
- "testSuiteName": "test-suite1",
- "number": 0,
- "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "namespace": "testkube",
- "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "args_mode": "append",
- "image": "kubeshop/testkube-executor-custom:1.10.11-dev-0a9c91",
- "imagePullSecrets": [
- {
- "name": "string"
}
], - "envs": {
- "record": "true",
- "prefix": "some-"
}, - "secretEnvs": {
- "secret_key_name1": "secret-name",
- "secret_Key_name2": "secret-name"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "negativeTest": false,
- "isNegativeTestChangedOnRun": false,
- "activeDeadlineSeconds": 1,
- "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "envConfigMaps": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "envSecrets": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}Response samples
- 201
- 400
- 404
- 500
- 502
{- "status": "queued",
- "output": "string",
- "outputType": "text/plain",
- "errorMessage": "string",
- "steps": [
- {
- "name": "step1",
- "duration": "10m0s",
- "status": "passed",
- "assertionResults": [
- {
- "name": "assertion1",
- "status": "passed",
- "errorMessage": "string"
}
]
}
], - "reports": {
- "junit": "string"
}
}Get all test executions
Returns array of all available test executions
path Parameters
| id required | string unique id of the object |
query Parameters
| last | integer Default: 7 last N days to show |
| pageSize | integer Default: 100 the number of executions to get, setting to 0 will return only totals |
| page | integer Default: 0 the page index to start at |
| status | string (ExecutionStatus) Enum: "queued" "running" "passed" "failed" "aborted" "timeout" "skipped" optional status filter containing multiple values separated by comma |
| startDate | string <date> startDate for filtering in ISO-8601 format, i.e. "yyyy-mm-dd" |
| endDate | string <date> endDate for filtering |
Responses
Response samples
- 200
- 404
- 500
{- "totals": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "filtered": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "results": [
- {
- "id": "62f395e004109209b50edfc4",
- "name": "test-suite1-test1",
- "number": 1,
- "testName": "test1",
- "testNamespace": "testkube",
- "testType": "postman/collection",
- "status": "queued",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "00:00:13",
- "durationMs": 10000,
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}
}
]
}Get test execution
Returns execution with given executionID
path Parameters
| id required | string unique id of the object |
| executionID required | string unique id of the object execution |
Responses
Response samples
- 200
- 404
- 500
- 502
{- "id": "62f395e004109209b50edfc4",
- "testName": "example-test",
- "testSuiteName": "test-suite1",
- "testNamespace": "testkube",
- "testType": "postman/collection",
- "name": "test-suite1-example-test-1",
- "number": 1,
- "envs": {
- "record": "true",
- "prefix": "some-"
}, - "command": [
- "curl"
], - "args": [
- "--concurrency",
- "2",
- "--remote",
- "--some",
- "blabla"
], - "args_mode": "append",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "testSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "testSuiteSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "content": {
- "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}, - "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "88s",
- "durationMs": 10000,
- "executionResult": {
- "status": "queued",
- "output": "string",
- "outputType": "text/plain",
- "errorMessage": "string",
- "steps": [
- {
- "name": "step1",
- "duration": "10m0s",
- "status": "passed",
- "assertionResults": [
- {
- "name": "assertion1",
- "status": "passed",
- "errorMessage": "string"
}
]
}
], - "reports": {
- "junit": "string"
}
}, - "labels": {
- "env": "prod",
- "app": "backend"
}, - "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "containerShell": "/bin/sh",
- "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}Aborts execution
Aborts execution with given executionID
path Parameters
| id required | string unique id of the object |
| executionID required | string unique id of the object execution |
Responses
Response samples
- 502
[- {
- "title": "Invalid test name",
- "status": 500,
- "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
}
]Create new test suite
Create new test suite action
Request Body schema:
test details body
| name required | string object name |
| namespace required | string object kubernetes namespace |
| description | string |
Array of objects (TestSuiteBatchStep) Run these batch steps before whole suite | |
Array of objects (TestSuiteBatchStep) Batch steps to run | |
Array of objects (TestSuiteBatchStep) Run these batch steps after whole suite | |
object test suite labels | |
| schedule | string schedule to run test suite |
| repeats | integer Default: 1 |
| created | string <date-time> |
object (TestSuiteExecutionRequest) test suite execution request body | |
required | object (TestSuiteStatus) test suite status |
| readOnly | boolean if test suite is offline and cannot be executed |
Responses
Request samples
- Payload
{- "name": "name",
- "namespace": "testkube",
- "description": "collection of tests",
- "before": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "steps": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "after": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}, - "schedule": "* * * * *",
- "repeats": 1,
- "created": "2019-08-24T14:15:22Z",
- "executionRequest": {
- "name": "testing with 1000 users",
- "number": 1,
- "namespace": "testkube",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "labels": {
- "users": "3",
- "prefix": "some-"
}, - "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "timeout": 1,
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "concurrencyLevel": 10,
- "testSuiteExecutionName": "string"
}, - "status": {
- "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "status": "queued"
}
}, - "readOnly": true
}Response samples
- 201
- 400
- 502
{- "name": "test-suite1",
- "namespace": "testkube",
- "description": "collection of tests",
- "before": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "steps": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "after": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}, - "schedule": "* * * * *",
- "repeats": 1,
- "created": "2019-08-24T14:15:22Z",
- "executionRequest": {
- "name": "testing with 1000 users",
- "number": 1,
- "namespace": "testkube",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "secretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "labels": {
- "users": "3",
- "prefix": "some-"
}, - "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "timeout": 1,
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "concurrencyLevel": 10,
- "testSuiteExecutionName": "string"
}, - "status": {
- "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "status": "queued"
}
}, - "readOnly": true
}Get all test suites
Returns array of test suites
query Parameters
| selector | string Labels to filter by |
| textSearch | string Default: "" text to search in name and test name |
Responses
Response samples
- 200
- 400
- 502
[- {
- "name": "test-suite1",
- "namespace": "testkube",
- "description": "collection of tests",
- "before": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "steps": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "after": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}, - "schedule": "* * * * *",
- "repeats": 1,
- "created": "2019-08-24T14:15:22Z",
- "executionRequest": {
- "name": "testing with 1000 users",
- "number": 1,
- "namespace": "testkube",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "secretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "labels": {
- "users": "3",
- "prefix": "some-"
}, - "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "timeout": 1,
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "concurrencyLevel": 10,
- "testSuiteExecutionName": "string"
}, - "status": {
- "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "status": "queued"
}
}, - "readOnly": true
}
]Delete test suites
Deletes all or labeled test suites
query Parameters
| selector | string Labels to filter by |
Responses
Response samples
- 404
- 502
[- {
- "title": "Invalid test name",
- "status": 500,
- "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
}
]Get test suite by ID
Returns test suite with given name
path Parameters
| id required | string unique id of the object |
Responses
Response samples
- 200
- 404
- 500
- 502
{- "name": "test-suite1",
- "namespace": "testkube",
- "description": "collection of tests",
- "before": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "steps": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "after": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}, - "schedule": "* * * * *",
- "repeats": 1,
- "created": "2019-08-24T14:15:22Z",
- "executionRequest": {
- "name": "testing with 1000 users",
- "number": 1,
- "namespace": "testkube",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "secretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "labels": {
- "users": "3",
- "prefix": "some-"
}, - "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "timeout": 1,
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "concurrencyLevel": 10,
- "testSuiteExecutionName": "string"
}, - "status": {
- "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "status": "queued"
}
}, - "readOnly": true
}Update test suite
Update test based on test suite content or git based data
path Parameters
| id required | string unique id of the object |
Request Body schema:
test suite details body
| name required | string object name |
| namespace | string object kubernetes namespace |
| description | string |
Array of objects (TestSuiteBatchStep) Run these batch steps before whole suite | |
Array of objects (TestSuiteBatchStep) Batch steps to run | |
Array of objects (TestSuiteBatchStep) Run these batch steps after whole suite | |
object test suite labels | |
| schedule | string schedule to run test suite |
| repeats | integer Default: 1 |
| created | string <date-time> |
object (TestSuiteExecutionRequest) test suite execution request body | |
required | object (TestSuiteStatus) test suite status |
| readOnly | boolean if test suite is offline and cannot be executed |
Responses
Request samples
- Payload
{- "name": "name",
- "namespace": "testkube",
- "description": "collection of tests",
- "before": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "steps": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "after": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}, - "schedule": "* * * * *",
- "repeats": 1,
- "created": "2019-08-24T14:15:22Z",
- "executionRequest": {
- "name": "testing with 1000 users",
- "number": 1,
- "namespace": "testkube",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "labels": {
- "users": "3",
- "prefix": "some-"
}, - "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "timeout": 1,
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "concurrencyLevel": 10,
- "testSuiteExecutionName": "string"
}, - "status": {
- "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "status": "queued"
}
}, - "readOnly": true
}Response samples
- 200
- 400
- 404
- 502
{- "name": "test-suite1",
- "namespace": "testkube",
- "description": "collection of tests",
- "before": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "steps": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "after": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}, - "schedule": "* * * * *",
- "repeats": 1,
- "created": "2019-08-24T14:15:22Z",
- "executionRequest": {
- "name": "testing with 1000 users",
- "number": 1,
- "namespace": "testkube",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "secretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "labels": {
- "users": "3",
- "prefix": "some-"
}, - "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "timeout": 1,
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "concurrencyLevel": 10,
- "testSuiteExecutionName": "string"
}, - "status": {
- "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "status": "queued"
}
}, - "readOnly": true
}List tests for test suite
List available tests for test suite
path Parameters
| id required | string unique id of the object |
Responses
Response samples
- 200
- 404
- 502
[- {
- "name": "test1",
- "namespace": "testkube",
- "description": "this test is used for that purpose",
- "type": "postman/collection",
- "content": {
- "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}, - "source": "my-private-repository-test",
- "created": "2022-07-30T06:54:15Z",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "schedule": "* * * * *",
- "readOnly": true,
- "uploads": [
- "settings/config.txt"
], - "executionRequest": {
- "id": "62f395e004109209b50edfc1",
- "name": "testing with 1000 users",
- "testSuiteName": "test-suite1",
- "number": 0,
- "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "namespace": "testkube",
- "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "testSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "testSuiteSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "args_mode": "append",
- "image": "kubeshop/testkube-executor-custom:1.10.11-dev-0a9c91",
- "imagePullSecrets": [
- {
- "name": "string"
}
], - "envs": {
- "record": "true",
- "prefix": "some-"
}, - "secretEnvs": {
- "secret_key_name1": "secret-name",
- "secret_Key_name2": "secret-name"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "negativeTest": false,
- "isNegativeTestChangedOnRun": false,
- "activeDeadlineSeconds": 1,
- "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "envConfigMaps": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "envSecrets": [
- {
- "reference": {
- "name": "string"
}, - "mount": "/etc/data",
- "mountPath": "string",
- "mapToVariables": false
}
], - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}, - "status": {
- "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "number": 1,
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "status": "queued"
}
}
}
]Abort all executions of a test suite
Abort all test executions of a test suite
path Parameters
| id required | string unique id of the object |
Responses
Response samples
- 404
- 500
- 502
[- {
- "title": "Invalid test name",
- "status": 500,
- "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
}
]Get all test suite with executions
Returns array of test suite with executions
query Parameters
| selector | string Labels to filter by |
| textSearch | string Default: "" text to search in name and test name |
| status | string (TestSuiteExecutionStatus) Enum: "queued" "running" "passed" "failed" "aborting" "aborted" "timeout" optional status filter containing multiple values separated by comma |
| pageSize | integer Default: 100 the number of executions to get, setting to 0 will return only totals |
| page | integer Default: 0 the page index to start at |
Responses
Response samples
- 200
- 400
- 500
- 502
[- {
- "testSuite": {
- "name": "test-suite1",
- "namespace": "testkube",
- "description": "collection of tests",
- "before": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "steps": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "after": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}, - "schedule": "* * * * *",
- "repeats": 1,
- "created": "2019-08-24T14:15:22Z",
- "executionRequest": {
- "name": "testing with 1000 users",
- "number": 1,
- "namespace": "testkube",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "secretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "labels": {
- "users": "3",
- "prefix": "some-"
}, - "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "timeout": 1,
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "concurrencyLevel": 10,
- "testSuiteExecutionName": "string"
}, - "status": {
- "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "status": "queued"
}
}, - "readOnly": true
}, - "latestExecution": {
- "id": "62f395e004109209b50edfc1",
- "name": "test-suite1.needlessly-sweet-imp",
- "testSuiteName": "test-suite1",
- "status": "queued",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "00:00:09",
- "durationMs": 9009,
- "execution": [
- {
- "execute": [
- {
- "id": "62f395e004109209b50edfc4",
- "name": "run:testkube/test1",
- "testName": "test1",
- "status": "queued",
- "type": "executeTest"
}
]
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}
}
}
]Get test suite by ID with execution
Returns test suite with given name with execution
path Parameters
| id required | string unique id of the object |
Responses
Response samples
- 200
- 500
{- "testSuite": {
- "name": "test-suite1",
- "namespace": "testkube",
- "description": "collection of tests",
- "before": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "steps": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "after": [
- {
- "stopOnFailure": true,
- "execute": [
- {
- "test": "example-test"
}
]
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}, - "schedule": "* * * * *",
- "repeats": 1,
- "created": "2019-08-24T14:15:22Z",
- "executionRequest": {
- "name": "testing with 1000 users",
- "number": 1,
- "namespace": "testkube",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "secretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "labels": {
- "users": "3",
- "prefix": "some-"
}, - "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "timeout": 1,
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "concurrencyLevel": 10,
- "testSuiteExecutionName": "string"
}, - "status": {
- "latestExecution": {
- "id": "62f395e004109209b50edfc4",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "status": "queued"
}
}, - "readOnly": true
}, - "latestExecution": {
- "id": "62f395e004109209b50edfc1",
- "name": "test-suite1.needlessly-sweet-imp",
- "testSuite": {
- "namespace": "testkube",
- "name": "name"
}, - "status": "queued",
- "envs": {
- "record": "true",
- "prefix": "some-"
}, - "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "secretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "2m",
- "durationMs": 6000,
- "stepResults": [
- {
- "step": {
- "stopTestOnFailure": true,
- "execute": {
- "namespace": "testkube",
- "name": "name"
}, - "delay": {
- "duration": 0
}
}, - "test": {
- "namespace": "testkube",
- "name": "name"
}, - "execution": {
- "id": "62f395e004109209b50edfc4",
- "testName": "example-test",
- "testSuiteName": "test-suite1",
- "testNamespace": "testkube",
- "testType": "postman/collection",
- "name": "test-suite1-example-test-1",
- "number": 1,
- "envs": {
- "record": "true",
- "prefix": "some-"
}, - "command": [
- "curl"
], - "args": [
- "--concurrency",
- "2",
- "--remote",
- "--some",
- "blabla"
], - "args_mode": "append",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "testSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "testSuiteSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "content": {
- "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}, - "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "88s",
- "durationMs": 10000,
- "executionResult": {
- "status": "queued",
- "output": "string",
- "outputType": "text/plain",
- "errorMessage": "string",
- "steps": [
- {
- "name": "step1",
- "duration": "10m0s",
- "status": "passed",
- "assertionResults": [
- {
- "name": null,
- "status": null,
- "errorMessage": null
}
]
}
], - "reports": {
- "junit": "string"
}
}, - "labels": {
- "env": "prod",
- "app": "backend"
}, - "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "containerShell": "/bin/sh",
- "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}
}
], - "executeStepResults": [
- {
- "step": {
- "stopOnFailure": true,
- "downloadArtifacts": {
- "allPreviousSteps": false,
- "previousStepNumbers": [
- 0
], - "previousTestNames": [
- "string"
]
}, - "execute": [
- {
- "test": "name",
- "delay": "1s",
- "executionRequest": {
- "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "args_mode": "append",
- "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "negativeTest": false,
- "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "runningContext": {
- "type": "userCLI",
- "context": "string"
}
}
}
]
}, - "execute": [
- {
- "step": {
- "test": "name",
- "delay": "1s",
- "executionRequest": {
- "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "args_mode": "append",
- "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "negativeTest": false,
- "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "runningContext": {
- "type": "userCLI",
- "context": "string"
}
}
}, - "test": {
- "namespace": "testkube",
- "name": "name"
}, - "execution": {
- "id": "62f395e004109209b50edfc4",
- "testName": "example-test",
- "testSuiteName": "test-suite1",
- "testNamespace": "testkube",
- "testType": "postman/collection",
- "name": "test-suite1-example-test-1",
- "number": 1,
- "envs": {
- "record": "true",
- "prefix": "some-"
}, - "command": [
- "curl"
], - "args": [
- "--concurrency",
- "2",
- "--remote",
- "--some",
- "blabla"
], - "args_mode": "append",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "testSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "testSuiteSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "content": {
- "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": null,
- "name": null,
- "key": null
}, - "tokenSecret": {
- "namespace": null,
- "name": null,
- "key": null
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}, - "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "88s",
- "durationMs": 10000,
- "executionResult": {
- "status": "queued",
- "output": "string",
- "outputType": "text/plain",
- "errorMessage": "string",
- "steps": [
- {
- "name": null,
- "duration": null,
- "status": null,
- "assertionResults": [ ]
}
], - "reports": {
- "junit": "string"
}
}, - "labels": {
- "env": "prod",
- "app": "backend"
}, - "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "containerShell": "/bin/sh",
- "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": null,
- "memory": null
}, - "limits": {
- "cpu": null,
- "memory": null
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}
}
], - "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "2m"
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "testSuiteExecutionName": "string"
}
}Starts new test suite execution
New test suite execution returns new execution details on successful execution start
path Parameters
| id required | string unique id of the object |
query Parameters
| namespace | string Default: "testkube" Namespace of the object |
| last | integer Default: 7 last N days to show |
| testSuiteExecutionName | string test suite execution name stated the test suite execution |
Request Body schema: application/json
body passed to configure execution
| name | string test execution custom name |
| number | integer test suite execution number |
| namespace | string test kubernetes namespace ("testkube" when not set) |
object (Variables) execution variables passed to executor converted to vars for usage in tests | |
object test suite labels | |
object execution labels | |
| sync | boolean whether to start execution sync or async |
| httpProxy | string http proxy for executor containers |
| httpsProxy | string https proxy for executor containers |
| timeout | integer <int32> duration in seconds the test suite may be active, until its stopped |
object (TestContentRequest) test content request body | |
object (RunningContext) running context for test or test suite execution | |
| jobTemplate | string job template extensions |
| jobTemplateReference | string name of the template resource |
| cronJobTemplate | string cron job template extensions |
| cronJobTemplateReference | string name of the template resource |
| scraperTemplate | string scraper template extensions |
| scraperTemplateReference | string name of the template resource |
| pvcTemplate | string pvc template extensions |
| pvcTemplateReference | string name of the template resource |
| concurrencyLevel | integer <int32> number of tests run in parallel |
| testSuiteExecutionName | string test suite execution name started the test suite execution |
Responses
Request samples
- Payload
{- "name": "testing with 1000 users",
- "number": 1,
- "namespace": "testkube",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "labels": {
- "users": "3",
- "prefix": "some-"
}, - "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "timeout": 1,
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "concurrencyLevel": 10,
- "testSuiteExecutionName": "string"
}Response samples
- 201
- 400
- 404
- 500
- 502
{- "totals": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "filtered": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "results": [
- {
- "id": "62f395e004109209b50edfc1",
- "name": "test-suite1.needlessly-sweet-imp",
- "testSuiteName": "test-suite1",
- "status": "queued",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "00:00:09",
- "durationMs": 9009,
- "execution": [
- {
- "execute": [
- {
- "id": "62f395e004109209b50edfc4",
- "name": "run:testkube/test1",
- "testName": "test1",
- "status": "queued",
- "type": "executeTest"
}
]
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}
}
]
}Get all test suite executions
Returns array of all available test suite executions
path Parameters
| id required | string unique id of the object |
query Parameters
| pageSize | integer Default: 100 the number of executions to get, setting to 0 will return only totals |
| page | integer Default: 0 the page index to start at |
| status | string (TestSuiteExecutionStatus) Enum: "queued" "running" "passed" "failed" "aborting" "aborted" "timeout" optional status filter containing multiple values separated by comma |
| startDate | string <date> startDate for filtering in ISO-8601 format, i.e. "yyyy-mm-dd" |
| endDate | string <date> endDate for filtering |
Responses
Response samples
- 200
- 500
{- "totals": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "filtered": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "results": [
- {
- "id": "62f395e004109209b50edfc1",
- "name": "test-suite1.needlessly-sweet-imp",
- "testSuiteName": "test-suite1",
- "status": "queued",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "00:00:09",
- "durationMs": 9009,
- "execution": [
- {
- "execute": [
- {
- "id": "62f395e004109209b50edfc4",
- "name": "run:testkube/test1",
- "testName": "test1",
- "status": "queued",
- "type": "executeTest"
}
]
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}
}
]
}Get test suite execution
Returns test suite execution with given executionID
path Parameters
| id required | string unique id of the object |
| executionID required | string unique id of the object execution |
Responses
Response samples
- 200
- 404
- 500
- 502
{- "id": "62f395e004109209b50edfc1",
- "name": "test-suite1.needlessly-sweet-imp",
- "testSuite": {
- "namespace": "testkube",
- "name": "name"
}, - "status": "queued",
- "envs": {
- "record": "true",
- "prefix": "some-"
}, - "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "secretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "2m",
- "durationMs": 6000,
- "stepResults": [
- {
- "step": {
- "stopTestOnFailure": true,
- "execute": {
- "namespace": "testkube",
- "name": "name"
}, - "delay": {
- "duration": 0
}
}, - "test": {
- "namespace": "testkube",
- "name": "name"
}, - "execution": {
- "id": "62f395e004109209b50edfc4",
- "testName": "example-test",
- "testSuiteName": "test-suite1",
- "testNamespace": "testkube",
- "testType": "postman/collection",
- "name": "test-suite1-example-test-1",
- "number": 1,
- "envs": {
- "record": "true",
- "prefix": "some-"
}, - "command": [
- "curl"
], - "args": [
- "--concurrency",
- "2",
- "--remote",
- "--some",
- "blabla"
], - "args_mode": "append",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "testSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "testSuiteSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "content": {
- "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}, - "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "88s",
- "durationMs": 10000,
- "executionResult": {
- "status": "queued",
- "output": "string",
- "outputType": "text/plain",
- "errorMessage": "string",
- "steps": [
- {
- "name": "step1",
- "duration": "10m0s",
- "status": "passed",
- "assertionResults": [
- {
- "name": "assertion1",
- "status": "passed",
- "errorMessage": "string"
}
]
}
], - "reports": {
- "junit": "string"
}
}, - "labels": {
- "env": "prod",
- "app": "backend"
}, - "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "containerShell": "/bin/sh",
- "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}
}
], - "executeStepResults": [
- {
- "step": {
- "stopOnFailure": true,
- "downloadArtifacts": {
- "allPreviousSteps": false,
- "previousStepNumbers": [
- 0
], - "previousTestNames": [
- "string"
]
}, - "execute": [
- {
- "test": "name",
- "delay": "1s",
- "executionRequest": {
- "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "args_mode": "append",
- "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "negativeTest": false,
- "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "runningContext": {
- "type": "userCLI",
- "context": "string"
}
}
}
]
}, - "execute": [
- {
- "step": {
- "test": "name",
- "delay": "1s",
- "executionRequest": {
- "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "args_mode": "append",
- "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "negativeTest": false,
- "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "runningContext": {
- "type": "userCLI",
- "context": "string"
}
}
}, - "test": {
- "namespace": "testkube",
- "name": "name"
}, - "execution": {
- "id": "62f395e004109209b50edfc4",
- "testName": "example-test",
- "testSuiteName": "test-suite1",
- "testNamespace": "testkube",
- "testType": "postman/collection",
- "name": "test-suite1-example-test-1",
- "number": 1,
- "envs": {
- "record": "true",
- "prefix": "some-"
}, - "command": [
- "curl"
], - "args": [
- "--concurrency",
- "2",
- "--remote",
- "--some",
- "blabla"
], - "args_mode": "append",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "isVariablesFileUploaded": false,
- "variablesFile": "string",
- "testSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "testSuiteSecretUUID": "7934600f-b367-48dd-b981-4353304362fb",
- "content": {
- "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}, - "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "88s",
- "durationMs": 10000,
- "executionResult": {
- "status": "queued",
- "output": "string",
- "outputType": "text/plain",
- "errorMessage": "string",
- "steps": [
- {
- "name": "step1",
- "duration": "10m0s",
- "status": "passed",
- "assertionResults": [
- null
]
}
], - "reports": {
- "junit": "string"
}
}, - "labels": {
- "env": "prod",
- "app": "backend"
}, - "uploads": [
- "settings/config.txt"
], - "bucketName": "execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43",
- "artifactRequest": {
- "storageClassName": "artifact-volume-local",
- "volumeMountPath": "string",
- "dirs": [
- "string"
], - "masks": [
- "string"
], - "storageBucket": "test1-artifacts",
- "omitFolderPerExecution": true,
- "sharedBetweenPods": true
}, - "preRunScript": "echo -n '$SECRET_ENV' > ./secret_file",
- "postRunScript": "sleep 30",
- "executePostRunScriptBeforeScraping": true,
- "sourceScripts": true,
- "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "containerShell": "/bin/sh",
- "testExecutionName": "string",
- "downloadArtifactExecutionIDs": [
- "string"
], - "downloadArtifactTestNames": [
- "string"
], - "slavePodRequest": {
- "resources": {
- "requests": {
- "cpu": "250m",
- "memory": "64Mi"
}, - "limits": {
- "cpu": "250m",
- "memory": "64Mi"
}
}, - "podTemplate": "string",
- "podTemplateReference": "string"
}, - "executionNamespace": "string"
}
}
], - "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "2m"
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "testSuiteExecutionName": "string"
}Aborts testsuite execution
Aborts testsuite execution with given executionID
path Parameters
| id required | string unique id of the object |
| executionID required | string unique id of the object execution |
Responses
Response samples
- 404
- 500
[- {
- "title": "Invalid test name",
- "status": 500,
- "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
}
]Get test suite execution artifacts
Returns test suite execution artifacts with given executionID
path Parameters
| id required | string unique id of the object |
| executionID required | string unique id of the object execution |
Responses
Response samples
- 200
- 404
- 500
{- "name": "string",
- "size": 0,
- "executionName": "test-1",
- "status": "ready"
}Starts new test suite executions
New test suite executions returns new executions details on successful executions start
query Parameters
| namespace | string Default: "testkube" Namespace of the object |
| selector | string Labels to filter by |
| concurrency | integer Default: 10 |
Request Body schema: application/json
body passed to configure executions
| name | string test execution custom name |
| number | integer test suite execution number |
| namespace | string test kubernetes namespace ("testkube" when not set) |
object (Variables) execution variables passed to executor converted to vars for usage in tests | |
object test suite labels | |
object execution labels | |
| sync | boolean whether to start execution sync or async |
| httpProxy | string http proxy for executor containers |
| httpsProxy | string https proxy for executor containers |
| timeout | integer <int32> duration in seconds the test suite may be active, until its stopped |
object (TestContentRequest) test content request body | |
object (RunningContext) running context for test or test suite execution | |
| jobTemplate | string job template extensions |
| jobTemplateReference | string name of the template resource |
| cronJobTemplate | string cron job template extensions |
| cronJobTemplateReference | string name of the template resource |
| scraperTemplate | string scraper template extensions |
| scraperTemplateReference | string name of the template resource |
| pvcTemplate | string pvc template extensions |
| pvcTemplateReference | string name of the template resource |
| concurrencyLevel | integer <int32> number of tests run in parallel |
| testSuiteExecutionName | string test suite execution name started the test suite execution |
Responses
Request samples
- Payload
{- "name": "testing with 1000 users",
- "number": 1,
- "namespace": "testkube",
- "variables": {
- "var1": {
- "name": "var1",
- "type": "basic",
- "value": "value1"
}, - "secret1": {
- "name": "secret1",
- "type": "secret",
- "value": "secretvalue1"
}
}, - "labels": {
- "users": "3",
- "prefix": "some-"
}, - "executionLabels": {
- "users": "3",
- "prefix": "some-"
}, - "sync": true,
- "httpProxy": "user:pass@my.proxy.server:8080",
- "httpsProxy": "user:pass@my.proxy.server:8081",
- "timeout": 1,
- "contentRequest": {
- "repository": {
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "workingDir": "/"
}
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}, - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "cronJobTemplate": "string",
- "cronJobTemplateReference": "string",
- "scraperTemplate": "string",
- "scraperTemplateReference": "string",
- "pvcTemplate": "string",
- "pvcTemplateReference": "string",
- "concurrencyLevel": 10,
- "testSuiteExecutionName": "string"
}Response samples
- 201
- 400
- 500
- 502
[- {
- "totals": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "filtered": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "results": [
- {
- "id": "62f395e004109209b50edfc1",
- "name": "test-suite1.needlessly-sweet-imp",
- "testSuiteName": "test-suite1",
- "status": "queued",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "00:00:09",
- "durationMs": 9009,
- "execution": [
- {
- "execute": [
- {
- "id": "62f395e004109209b50edfc4",
- "name": "run:testkube/test1",
- "testName": "test1",
- "status": "queued",
- "type": "executeTest"
}
]
}
], - "labels": {
- "env": "prod",
- "app": "backend"
}
}
]
}
]Get test suite execution artifacts
Returns test suite execution artifacts with given executionID
path Parameters
| executionID required | string unique id of the object execution |
Responses
Response samples
- 200
- 500
{- "name": "string",
- "size": 0,
- "executionName": "test-1",
- "status": "ready"
}Download artifact
Download the artifact file from the given execution
path Parameters
| id required | string unique id of the object |
| filename required | string filename of the object usually used for artifacts |
Responses
Response samples
- 404
- 500
[- {
- "title": "Invalid test name",
- "status": 500,
- "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
}
]Download artifact archive
Download the artifact archive from the given execution
path Parameters
| id required | string unique id of the object |
query Parameters
| mask | string mask to filter files |
Responses
Response samples
- 404
- 500
[- {
- "title": "Invalid test name",
- "status": 500,
- "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
}
]Get execution's logs by ID
Returns logs of the given executionID
path Parameters
| id required | string unique id of the object |
Responses
Response samples
- 200
- 500
[- {
- "type": "error",
- "content": "string",
- "result": {
- "status": "queued",
- "output": "string",
- "outputType": "text/plain",
- "errorMessage": "string",
- "steps": [
- {
- "name": "step1",
- "duration": "10m0s",
- "status": "passed",
- "assertionResults": [
- {
- "name": "assertion1",
- "status": "passed",
- "errorMessage": "string"
}
]
}
], - "reports": {
- "junit": "string"
}
}, - "time": "2018-03-20T09:12:28Z"
}
]Get execution's logs by ID version 2
Returns logs of the given executionID version 2
path Parameters
| id required | string unique id of the object |
Responses
Response samples
- 200
- 500
[- {
- "time": "2018-03-20T09:12:28Z",
- "content": "string",
- "type": "string",
- "source": "job-pod",
- "error": true,
- "version": "v1",
- "metadata": {
- "argsl": "passed command arguments"
}, - "v1": {
- "result": {
- "status": "queued",
- "output": "string",
- "outputType": "text/plain",
- "errorMessage": "string",
- "steps": [
- {
- "name": "step1",
- "duration": "10m0s",
- "status": "passed",
- "assertionResults": [
- {
- "name": "assertion1",
- "status": "passed",
- "errorMessage": "string"
}
]
}
], - "reports": {
- "junit": "string"
}
}
}
}
]List executors
List executors available in cluster
query Parameters
| selector | string Labels to filter by |
Responses
Response samples
- 200
- 400
- 502
[- {
- "executorType": "string",
- "image": "string",
- "slaves": {
- "image": "kubeshop/ex-slaves-image:latest"
}, - "imagePullSecrets": [
- {
- "name": "string"
}
], - "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "types": [
- "string"
], - "uri": "string",
- "contentTypes": [
- "string"
], - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "features": [
- "artifacts"
], - "meta": {
- "iconURI": "/assets/k6.jpg",
- "tooltips": {
- "general": "please provide k6 test script for execution"
}
}, - "useDataDirAsWorkingDir": true
}
]Create new executor
Create new executor based on variables passed in request
Request Body schema:
executor request body data
| executorType | string ExecutorType one of "rest" for rest openapi based executors or "job" which will be default runners for testkube soon |
| image | string Image for kube-job |
object (SlavesMeta) Slave data for executing tests in distributed environment | |
Array of objects (LocalObjectReference) container image pull secrets | |
| command | Array of strings executor image command |
| args | Array of strings additional executor binary argument |
| types required | Array of strings Types defines what types can be handled by executor e.g. "postman/collection", ":curl/command" etc |
| uri | string URI for rest based executors |
| contentTypes | Array of strings list of handled content types |
| jobTemplate | string Job template to launch executor |
| jobTemplateReference | string name of the template resource |
object executor labels | |
| features | Array of strings Items Enum: "artifacts" "junit-report" Available executor features |
object (ExecutorMeta) Executor meta data | |
| useDataDirAsWorkingDir | boolean use data dir as working dir for executor |
| namespace required | string object kubernetes namespace |
| name required | string object name |
Responses
Request samples
- Payload
{- "executorType": "string",
- "image": "string",
- "slaves": {
- "image": "kubeshop/ex-slaves-image:latest"
}, - "imagePullSecrets": [
- {
- "name": "string"
}
], - "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "types": [
- "string"
], - "uri": "string",
- "contentTypes": [
- "string"
], - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "features": [
- "artifacts"
], - "meta": {
- "iconURI": "/assets/k6.jpg",
- "tooltips": {
- "general": "please provide k6 test script for execution"
}
}, - "useDataDirAsWorkingDir": true,
- "namespace": "testkube",
- "name": "name"
}Response samples
- 201
- 400
- 502
{- "name": "string",
- "executor": {
- "executorType": "string",
- "image": "string",
- "slaves": {
- "image": "kubeshop/ex-slaves-image:latest"
}, - "imagePullSecrets": [
- {
- "name": "string"
}
], - "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "types": [
- "string"
], - "uri": "string",
- "contentTypes": [
- "string"
], - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "features": [
- "artifacts"
], - "meta": {
- "iconURI": "/assets/k6.jpg",
- "tooltips": {
- "general": "please provide k6 test script for execution"
}
}, - "useDataDirAsWorkingDir": true
}, - "executions": {
- "totals": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "filtered": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "results": [
- {
- "id": "62f395e004109209b50edfc4",
- "name": "test-suite1-test1",
- "number": 1,
- "testName": "test1",
- "testNamespace": "testkube",
- "testType": "postman/collection",
- "status": "queued",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "00:00:13",
- "durationMs": 10000,
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}
}
]
}
}Get executor details
Returns executors data with executions passed to executor
path Parameters
| id required | string unique id of the object |
Responses
Response samples
- 200
- 400
- 500
- 502
{- "name": "string",
- "executor": {
- "executorType": "string",
- "image": "string",
- "slaves": {
- "image": "kubeshop/ex-slaves-image:latest"
}, - "imagePullSecrets": [
- {
- "name": "string"
}
], - "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "types": [
- "string"
], - "uri": "string",
- "contentTypes": [
- "string"
], - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "features": [
- "artifacts"
], - "meta": {
- "iconURI": "/assets/k6.jpg",
- "tooltips": {
- "general": "please provide k6 test script for execution"
}
}, - "useDataDirAsWorkingDir": true
}, - "executions": {
- "totals": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "filtered": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "results": [
- {
- "id": "62f395e004109209b50edfc4",
- "name": "test-suite1-test1",
- "number": 1,
- "testName": "test1",
- "testNamespace": "testkube",
- "testType": "postman/collection",
- "status": "queued",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "00:00:13",
- "durationMs": 10000,
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}
}
]
}
}Update executor
Update new executor based on variables passed in request
path Parameters
| id required | string unique id of the object |
Request Body schema:
executor request body data
| executorType | string ExecutorType one of "rest" for rest openapi based executors or "job" which will be default runners for testkube soon |
| image | string Image for kube-job |
object (SlavesMeta) Slave data for executing tests in distributed environment | |
Array of objects (LocalObjectReference) container image pull secrets | |
| command | Array of strings executor image command |
| args | Array of strings additional executor binary argument |
| types | Array of strings Types defines what types can be handled by executor e.g. "postman/collection", ":curl/command" etc |
| uri | string URI for rest based executors |
| contentTypes | Array of strings list of handled content types |
| jobTemplate | string Job template to launch executor |
| jobTemplateReference | string name of the template resource |
object executor labels | |
| features | Array of strings Items Enum: "artifacts" "junit-report" Available executor features |
object (ExecutorMeta) Executor meta data | |
| useDataDirAsWorkingDir | boolean use data dir as working dir for executor |
| namespace | string object kubernetes namespace |
| name required | string object name |
Responses
Request samples
- Payload
{- "executorType": "string",
- "image": "string",
- "slaves": {
- "image": "kubeshop/ex-slaves-image:latest"
}, - "imagePullSecrets": [
- {
- "name": "string"
}
], - "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "types": [
- "string"
], - "uri": "string",
- "contentTypes": [
- "string"
], - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "features": [
- "artifacts"
], - "meta": {
- "iconURI": "/assets/k6.jpg",
- "tooltips": {
- "general": "please provide k6 test script for execution"
}
}, - "useDataDirAsWorkingDir": true,
- "namespace": "testkube",
- "name": "name"
}Response samples
- 200
- 400
- 404
- 502
{- "name": "string",
- "executor": {
- "executorType": "string",
- "image": "string",
- "slaves": {
- "image": "kubeshop/ex-slaves-image:latest"
}, - "imagePullSecrets": [
- {
- "name": "string"
}
], - "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "types": [
- "string"
], - "uri": "string",
- "contentTypes": [
- "string"
], - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "features": [
- "artifacts"
], - "meta": {
- "iconURI": "/assets/k6.jpg",
- "tooltips": {
- "general": "please provide k6 test script for execution"
}
}, - "useDataDirAsWorkingDir": true
}, - "executions": {
- "totals": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "filtered": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "results": [
- {
- "id": "62f395e004109209b50edfc4",
- "name": "test-suite1-test1",
- "number": 1,
- "testName": "test1",
- "testNamespace": "testkube",
- "testType": "postman/collection",
- "status": "queued",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "00:00:13",
- "durationMs": 10000,
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}
}
]
}
}Get executor details by type
Returns executors data with executions passed to executor
query Parameters
| testType required | string test type of the executor |
Responses
Response samples
- 200
- 400
- 500
- 502
{- "name": "string",
- "executor": {
- "executorType": "string",
- "image": "string",
- "slaves": {
- "image": "kubeshop/ex-slaves-image:latest"
}, - "imagePullSecrets": [
- {
- "name": "string"
}
], - "command": [
- "curl"
], - "args": [
- "--repeats",
- "5",
- "--insecure"
], - "types": [
- "string"
], - "uri": "string",
- "contentTypes": [
- "string"
], - "jobTemplate": "string",
- "jobTemplateReference": "string",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "features": [
- "artifacts"
], - "meta": {
- "iconURI": "/assets/k6.jpg",
- "tooltips": {
- "general": "please provide k6 test script for execution"
}
}, - "useDataDirAsWorkingDir": true
}, - "executions": {
- "totals": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "filtered": {
- "results": 0,
- "passed": 0,
- "failed": 0,
- "queued": 0,
- "running": 0
}, - "results": [
- {
- "id": "62f395e004109209b50edfc4",
- "name": "test-suite1-test1",
- "number": 1,
- "testName": "test1",
- "testNamespace": "testkube",
- "testType": "postman/collection",
- "status": "queued",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "duration": "00:00:13",
- "durationMs": 10000,
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "runningContext": {
- "type": "userCLI",
- "context": "string"
}
}
]
}
}List webhooks
List webhooks available in cluster
query Parameters
| selector | string Labels to filter by |
Responses
Response samples
- 200
- 400
- 502
[- {
- "name": "webhook1",
- "namespace": "testkube",
- "events": [
- "start-test"
], - "selector": "string",
- "payloadObjectField": "string",
- "payloadTemplate": "string",
- "payloadTemplateReference": "string",
- "headers": {
- "Content-Type": "application/xml"
}, - "labels": {
- "env": "prod",
- "app": "backend"
}
}
]Create new webhook
Create new webhook based on variables passed in request
Request Body schema:
webhook request body data
| name | string |
| namespace | string |
| uri required | string |
| events required | Array of strings (EventType) Items Enum: "start-test" "end-test-success" "end-test-failed" "end-test-aborted" "end-test-timeout" "start-testsuite" "end-testsuite-success" "end-testsuite-failed" "end-testsuite-aborted" "end-testsuite-timeout" "created" "updated" "deleted" |
| selector | string Labels to filter for tests and test suites |
| payloadObjectField | string will load the generated payload for notification inside the object |
| payloadTemplate | string golang based template for notification payload |
| payloadTemplateReference | string name of the template resource |
object webhook headers (golang template supported) | |
object webhook labels |
Responses
Request samples
- Payload
{- "name": "webhook1",
- "namespace": "testkube",
- "events": [
- "start-test"
], - "selector": "string",
- "payloadObjectField": "string",
- "payloadTemplate": "string",
- "payloadTemplateReference": "string",
- "headers": {
- "Content-Type": "application/xml"
}, - "labels": {
- "env": "prod",
- "app": "backend"
}
}Response samples
- 201
- 400
- 502
{- "name": "webhook1",
- "namespace": "testkube",
- "events": [
- "start-test"
], - "selector": "string",
- "payloadObjectField": "string",
- "payloadTemplate": "string",
- "payloadTemplateReference": "string",
- "headers": {
- "Content-Type": "application/xml"
}, - "labels": {
- "env": "prod",
- "app": "backend"
}
}Get webhook details
Returns webhook
path Parameters
| id required | string unique id of the object |
Responses
Response samples
- 200
- 400
- 404
- 500
- 502
{- "name": "webhook1",
- "namespace": "testkube",
- "events": [
- "start-test"
], - "selector": "string",
- "payloadObjectField": "string",
- "payloadTemplate": "string",
- "payloadTemplateReference": "string",
- "headers": {
- "Content-Type": "application/xml"
}, - "labels": {
- "env": "prod",
- "app": "backend"
}
}Update new webhook
Update new webhook based on variables passed in request
path Parameters
| id required | string unique id of the object |
Request Body schema:
webhook request body data
| name | string |
| namespace | string |
| uri required | string |
| events required | Array of strings (EventType) Items Enum: "start-test" "end-test-success" "end-test-failed" "end-test-aborted" "end-test-timeout" "start-testsuite" "end-testsuite-success" "end-testsuite-failed" "end-testsuite-aborted" "end-testsuite-timeout" "created" "updated" "deleted" |
| selector | string Labels to filter for tests and test suites |
| payloadObjectField | string will load the generated payload for notification inside the object |
| payloadTemplate | string golang based template for notification payload |
| payloadTemplateReference | string name of the template resource |
object webhook headers (golang template supported) | |
object webhook labels |
Responses
Request samples
- Payload
{- "name": "webhook1",
- "namespace": "testkube",
- "events": [
- "start-test"
], - "selector": "string",
- "payloadObjectField": "string",
- "payloadTemplate": "string",
- "payloadTemplateReference": "string",
- "headers": {
- "Content-Type": "application/xml"
}, - "labels": {
- "env": "prod",
- "app": "backend"
}
}Response samples
- 200
- 400
- 404
- 502
{- "name": "webhook1",
- "namespace": "testkube",
- "events": [
- "start-test"
], - "selector": "string",
- "payloadObjectField": "string",
- "payloadTemplate": "string",
- "payloadTemplateReference": "string",
- "headers": {
- "Content-Type": "application/xml"
}, - "labels": {
- "env": "prod",
- "app": "backend"
}
}List test triggers
List test triggers from the kubernetes cluster
query Parameters
| namespace | string Default: "testkube" Namespace of the object |
| selector | string Labels to filter by |
Responses
Response samples
- 200
- 400
- 502
[- {
- "name": "test1",
- "namespace": "testkube",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "resource": "pod",
- "resourceSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "event": "modified",
- "conditionSpec": {
- "conditions": [
- {
- "status": "True",
- "type": "Progressing",
- "reason": "NewReplicaSetAvailable",
- "ttl": 1
}
], - "timeout": 1,
- "delay": 1
}, - "probeSpec": {
- "probes": [
- {
- "scheme": "http",
- "host": "testkube-api-server",
- "path": "/",
- "port": 80,
- "headers": {
- "Content-Type": "application/xml"
}
}
], - "timeout": 1,
- "delay": 1
}, - "action": "run",
- "execution": "test",
- "testSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "concurrencyPolicy": "allow"
}
]Create new test trigger
Create new test trigger CRD inside a Kubernetes cluster
Request Body schema:
test trigger body
| name required | string object name |
| namespace | string object kubernetes namespace |
object test trigger labels | |
| resource required | string (TestTriggerResources) Enum: "pod" "deployment" "statefulset" "daemonset" "service" "ingress" "event" "configmap" supported kubernetes resources for test triggers |
required | object (TestTriggerSelector) |
| event required | string listen for event for selected resource |
object (TestTriggerConditionSpec) | |
object (TestTriggerProbeSpec) | |
| action required | string (TestTriggerActions) Value: "run" supported actions for test triggers |
| execution required | string (TestTriggerExecutions) Enum: "test" "testsuite" supported test resources for test triggers |
required | object (TestTriggerSelector) |
| concurrencyPolicy | string (TestTriggerConcurrencyPolicies) Enum: "allow" "forbid" "replace" supported concurrency policies for test triggers |
Responses
Request samples
- Payload
{- "name": "name",
- "namespace": "testkube",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "resource": "pod",
- "resourceSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "event": "modified",
- "conditionSpec": {
- "conditions": [
- {
- "status": "True",
- "type": "Progressing",
- "reason": "NewReplicaSetAvailable",
- "ttl": 1
}
], - "timeout": 1,
- "delay": 1
}, - "probeSpec": {
- "probes": [
- {
- "scheme": "http",
- "host": "testkube-api-server",
- "path": "/",
- "port": 80,
- "headers": {
- "Content-Type": "application/xml"
}
}
], - "timeout": 1,
- "delay": 1
}, - "action": "run",
- "execution": "test",
- "testSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "concurrencyPolicy": "allow"
}Response samples
- 200
- 400
- 502
{- "name": "test1",
- "namespace": "testkube",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "resource": "pod",
- "resourceSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "event": "modified",
- "conditionSpec": {
- "conditions": [
- {
- "status": "True",
- "type": "Progressing",
- "reason": "NewReplicaSetAvailable",
- "ttl": 1
}
], - "timeout": 1,
- "delay": 1
}, - "probeSpec": {
- "probes": [
- {
- "scheme": "http",
- "host": "testkube-api-server",
- "path": "/",
- "port": 80,
- "headers": {
- "Content-Type": "application/xml"
}
}
], - "timeout": 1,
- "delay": 1
}, - "action": "run",
- "execution": "test",
- "testSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "concurrencyPolicy": "allow"
}Bulk update test triggers
Updates test triggers provided as an array in the request body
Request Body schema: application/json
array of test trigger upsert requests
| name required | string object name |
| namespace | string object kubernetes namespace |
object test trigger labels | |
| resource required | string (TestTriggerResources) Enum: "pod" "deployment" "statefulset" "daemonset" "service" "ingress" "event" "configmap" supported kubernetes resources for test triggers |
required | object (TestTriggerSelector) |
| event required | string listen for event for selected resource |
object (TestTriggerConditionSpec) | |
object (TestTriggerProbeSpec) | |
| action required | string (TestTriggerActions) Value: "run" supported actions for test triggers |
| execution required | string (TestTriggerExecutions) Enum: "test" "testsuite" supported test resources for test triggers |
required | object (TestTriggerSelector) |
| concurrencyPolicy | string (TestTriggerConcurrencyPolicies) Enum: "allow" "forbid" "replace" supported concurrency policies for test triggers |
Responses
Request samples
- Payload
[- {
- "name": "name",
- "namespace": "testkube",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "resource": "pod",
- "resourceSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "event": "modified",
- "conditionSpec": {
- "conditions": [
- {
- "status": "True",
- "type": "Progressing",
- "reason": "NewReplicaSetAvailable",
- "ttl": 1
}
], - "timeout": 1,
- "delay": 1
}, - "probeSpec": {
- "probes": [
- {
- "scheme": "http",
- "host": "testkube-api-server",
- "path": "/",
- "port": 80,
- "headers": {
- "Content-Type": "application/xml"
}
}
], - "timeout": 1,
- "delay": 1
}, - "action": "run",
- "execution": "test",
- "testSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "concurrencyPolicy": "allow"
}
]Response samples
- 200
- 400
- 502
[- {
- "name": "test1",
- "namespace": "testkube",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "resource": "pod",
- "resourceSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "event": "modified",
- "conditionSpec": {
- "conditions": [
- {
- "status": "True",
- "type": "Progressing",
- "reason": "NewReplicaSetAvailable",
- "ttl": 1
}
], - "timeout": 1,
- "delay": 1
}, - "probeSpec": {
- "probes": [
- {
- "scheme": "http",
- "host": "testkube-api-server",
- "path": "/",
- "port": 80,
- "headers": {
- "Content-Type": "application/xml"
}
}
], - "timeout": 1,
- "delay": 1
}, - "action": "run",
- "execution": "test",
- "testSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "concurrencyPolicy": "allow"
}
]Delete test triggers
Deletes all or labeled test triggers
query Parameters
| namespace | string Default: "testkube" Namespace of the object |
| selector | string Labels to filter by |
Responses
Response samples
- 400
- 404
- 502
[- {
- "title": "Invalid test name",
- "status": 500,
- "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
}
]Get test trigger by ID
Get test trigger by ID from CRD in kubernetes cluster
path Parameters
| id required | string unique id of the object |
query Parameters
| namespace | string Default: "testkube" Namespace of the object |
Responses
Response samples
- 200
- 404
- 502
{- "name": "test1",
- "namespace": "testkube",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "resource": "pod",
- "resourceSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "event": "modified",
- "conditionSpec": {
- "conditions": [
- {
- "status": "True",
- "type": "Progressing",
- "reason": "NewReplicaSetAvailable",
- "ttl": 1
}
], - "timeout": 1,
- "delay": 1
}, - "probeSpec": {
- "probes": [
- {
- "scheme": "http",
- "host": "testkube-api-server",
- "path": "/",
- "port": 80,
- "headers": {
- "Content-Type": "application/xml"
}
}
], - "timeout": 1,
- "delay": 1
}, - "action": "run",
- "execution": "test",
- "testSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "concurrencyPolicy": "allow"
}Update test trigger
Update test trigger
path Parameters
| id required | string unique id of the object |
query Parameters
| namespace | string Default: "testkube" Namespace of the object |
Request Body schema:
test trigger upsert request
| name required | string object name |
| namespace | string object kubernetes namespace |
object test trigger labels | |
| resource required | string (TestTriggerResources) Enum: "pod" "deployment" "statefulset" "daemonset" "service" "ingress" "event" "configmap" supported kubernetes resources for test triggers |
required | object (TestTriggerSelector) |
| event required | string listen for event for selected resource |
object (TestTriggerConditionSpec) | |
object (TestTriggerProbeSpec) | |
| action required | string (TestTriggerActions) Value: "run" supported actions for test triggers |
| execution required | string (TestTriggerExecutions) Enum: "test" "testsuite" supported test resources for test triggers |
required | object (TestTriggerSelector) |
| concurrencyPolicy | string (TestTriggerConcurrencyPolicies) Enum: "allow" "forbid" "replace" supported concurrency policies for test triggers |
Responses
Request samples
- Payload
{- "name": "name",
- "namespace": "testkube",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "resource": "pod",
- "resourceSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "event": "modified",
- "conditionSpec": {
- "conditions": [
- {
- "status": "True",
- "type": "Progressing",
- "reason": "NewReplicaSetAvailable",
- "ttl": 1
}
], - "timeout": 1,
- "delay": 1
}, - "probeSpec": {
- "probes": [
- {
- "scheme": "http",
- "host": "testkube-api-server",
- "path": "/",
- "port": 80,
- "headers": {
- "Content-Type": "application/xml"
}
}
], - "timeout": 1,
- "delay": 1
}, - "action": "run",
- "execution": "test",
- "testSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "concurrencyPolicy": "allow"
}Response samples
- 200
- 400
- 404
- 502
{- "name": "test1",
- "namespace": "testkube",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "resource": "pod",
- "resourceSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "event": "modified",
- "conditionSpec": {
- "conditions": [
- {
- "status": "True",
- "type": "Progressing",
- "reason": "NewReplicaSetAvailable",
- "ttl": 1
}
], - "timeout": 1,
- "delay": 1
}, - "probeSpec": {
- "probes": [
- {
- "scheme": "http",
- "host": "testkube-api-server",
- "path": "/",
- "port": 80,
- "headers": {
- "Content-Type": "application/xml"
}
}
], - "timeout": 1,
- "delay": 1
}, - "action": "run",
- "execution": "test",
- "testSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "concurrencyPolicy": "allow"
}Delete test trigger
Deletes a test trigger
path Parameters
| id required | string unique id of the object |
query Parameters
| namespace | string Default: "testkube" Namespace of the object |
Responses
Response samples
- 404
- 502
[- {
- "title": "Invalid test name",
- "status": 500,
- "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
}
]Test triggers keymap
Returns a keymap (supported/allowed fields) for the test trigger UI screen
Responses
Response samples
- 200
{- "resources": [
- "pod",
- "deployment",
- "statefulset",
- "daemonset",
- "service",
- "ingress",
- "event",
- "configmap"
], - "actions": [
- "run"
], - "executions": [
- "test",
- "testsuite"
], - "events": {
- "pod": [
- "created",
- "modified",
- "deleted"
], - "deployment": [
- "created",
- "modified",
- "deleted"
]
}, - "conditions": [
- "Available",
- "Progressing"
], - "concurrencyPolicies": [
- "allow",
- "forbid",
- "replace"
]
}Create new template
Create new template based on variables passed in request
Request Body schema:
template request body data
| name required | string template name for reference |
| namespace | string template namespace |
| type required | string (TemplateType) Enum: "job" "container" "cronjob" "scraper" "pvc" "webhook" "pod" template type by purpose |
| body required | string template body to use |
object template labels |
Responses
Request samples
- Payload
{- "name": "webhook-template",
- "namespace": "testkube",
- "type": "job",
- "body": "{\"id\": \"{{ .Id }}\"}",
- "labels": {
- "env": "prod",
- "app": "backend"
}
}Response samples
- 201
- 400
- 502
{- "name": "webhook-template",
- "namespace": "testkube",
- "type": "job",
- "body": "{\"id\": \"{{ .Id }}\"}",
- "labels": {
- "env": "prod",
- "app": "backend"
}
}Update new template
Update new template based on variables passed in request
path Parameters
| id required | string unique id of the object |
Request Body schema:
template request body data
| name required | string template name for reference |
| namespace | string template namespace |
| type required | string (TemplateType) Enum: "job" "container" "cronjob" "scraper" "pvc" "webhook" "pod" template type by purpose |
| body required | string template body to use |
object template labels |
Responses
Request samples
- Payload
{- "name": "webhook-template",
- "namespace": "testkube",
- "type": "job",
- "body": "{\"id\": \"{{ .Id }}\"}",
- "labels": {
- "env": "prod",
- "app": "backend"
}
}Response samples
- 200
- 400
- 404
- 502
{- "name": "webhook-template",
- "namespace": "testkube",
- "type": "job",
- "body": "{\"id\": \"{{ .Id }}\"}",
- "labels": {
- "env": "prod",
- "app": "backend"
}
}List test sources
List test sources available in cluster
query Parameters
| selector | string Labels to filter by |
Responses
Response samples
- 200
- 400
- 502
[- {
- "name": "testsource1",
- "namespace": "testkube",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}
]Create new test source
Create new test source based on variables passed in request
Request Body schema:
test source request body data
| name | string test source name |
| namespace | string test source namespace |
object test source labels | |
| type | string Enum: "string" "file-uri" "git-file" "git-dir" "git" type of sources a runner can get data from. string: String content (e.g. Postman JSON file). file-uri: content stored on the webserver. git-file: the file stored in the Git repo in the given repository.path field (Deprecated: use git instead). git-dir: the entire git repo or git subdirectory depending on the repository.path field (Testkube does a shadow clone and sparse checkout to limit IOs in the case of monorepos). (Deprecated: use git instead). git: automatically provisions either a file, directory or whole git repository depending on the repository.path field. |
object (Repository) repository representation for tests in git repositories | |
| data | string test content data as string |
| uri | string test content |
Responses
Request samples
- Payload
{- "name": "testsource1",
- "namespace": "testkube",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}Response samples
- 201
- 400
- 502
{- "name": "testsource1",
- "namespace": "testkube",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}Process test source batch (create, update, delete)
Process test source batch based on variables passed in request
Request Body schema: application/json
test source batch request body data
required | Array of objects (TestSourceUpsertRequest) | ||||||||||||||
Array
| |||||||||||||||
Responses
Request samples
- Payload
{- "batch": [
- {
- "name": "testsource1",
- "namespace": "testkube",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}
]
}Response samples
- 200
- 400
- 502
{- "created": [
- "name1",
- "name2",
- "name3"
], - "updated": [
- "name4",
- "name5",
- "name6"
], - "deleted": [
- "name7",
- "name8",
- "name9"
]
}Update test source
Update test source based on test content or git based data
path Parameters
| id required | string unique id of the object |
Request Body schema:
test source body
| name | string test source name |
| namespace | string test source namespace |
object test source labels | |
| type | string Enum: "string" "file-uri" "git-file" "git-dir" "git" type of sources a runner can get data from. string: String content (e.g. Postman JSON file). file-uri: content stored on the webserver. git-file: the file stored in the Git repo in the given repository.path field (Deprecated: use git instead). git-dir: the entire git repo or git subdirectory depending on the repository.path field (Testkube does a shadow clone and sparse checkout to limit IOs in the case of monorepos). (Deprecated: use git instead). git: automatically provisions either a file, directory or whole git repository depending on the repository.path field. |
object (Repository) repository representation for tests in git repositories | |
| data | string test content data as string |
| uri | string test content |
Responses
Request samples
- Payload
{- "name": "testsource1",
- "namespace": "testkube",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}Response samples
- 200
- 400
- 404
- 502
{- "name": "testsource1",
- "namespace": "testkube",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}Delete test source
Deletes test source by its name
path Parameters
| id required | string unique id of the object |
Responses
Response samples
- 502
[- {
- "title": "Invalid test name",
- "status": 500,
- "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
}
]Get test source data
Returns test sources data
path Parameters
| id required | string unique id of the object |
Responses
Response samples
- 200
- 400
- 404
- 500
- 502
{- "name": "testsource1",
- "namespace": "testkube",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "type": "string",
- "repository": {
- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}, - "data": "string",
}Validate new repository
Validate new repository based on variables passed in request
Request Body schema: application/json
repository request body data
| type required | string Value: "git" VCS repository type |
| uri required | string uri of content file or git directory |
| branch | string branch/tag name for checkout |
| commit | string commit id (sha) for checkout |
| path | string if needed we can checkout particular path (dir or file) in case of BIG/mono repositories |
| username | string git auth username for private repositories |
| token | string git auth token for private repositories |
object (SecretRef) Testkube internal reference for secret storage in Kubernetes secrets | |
object (SecretRef) Testkube internal reference for secret storage in Kubernetes secrets | |
| certificateSecret | string secret with certificate for private repositories. Should contain one key ending with .crt such as "mycorp.crt", whose value is the certificate file content, suitable for git config http.sslCAInfo |
| workingDir | string if provided we checkout the whole repository and run test from this directory |
| authType | string Enum: "basic" "header" auth type for git requests |
Responses
Request samples
- Payload
{- "type": "git",
- "branch": "main",
- "commit": "b928cbb7186944ab9275937ec1ac3d3738ca2e1d",
- "path": "test/perf",
- "username": "string",
- "token": "string",
- "usernameSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "tokenSecret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}, - "certificateSecret": "string",
- "workingDir": "/",
- "authType": "basic"
}Response samples
- 400
- 500
- 502
[- {
- "title": "Invalid test name",
- "status": 500,
- "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
}
]